hulk inclusion category: bugfix bugzilla: 5499 CVE: NA
---------------------------
cleanup_srcu_struct_quiesced won't free memory if work_pending() is true, and it will cause a memory leak, so revert it and using mainline patch instead.
Signed-off-by: Yang Yingliang yangyingliang@huawei.com Reviewed-by: Hanjun Guo guohanjun@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/char/ipmi/ipmi_msghandler.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 0085d32cef46..7510013f28f8 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -1190,12 +1190,7 @@ EXPORT_SYMBOL(ipmi_get_smi_info); static void free_user(struct kref *ref) { struct ipmi_user *user = container_of(ref, struct ipmi_user, refcount); - - /* - * Cleanup without waiting. This could be called in atomic context. - * Refcount is zero: all read-sections should have been ended. - */ - cleanup_srcu_struct_quiesced(&user->release_barrier); + cleanup_srcu_struct(&user->release_barrier); kfree(user); }