提交 bbae7093 编写于 作者: B Borislav Petkov 提交者: Xie XiuQi

RAS/CEC: Fix potential memory leak

mainline inclusion
from mainline-5.2-rc3
commit d0e375e8
category: bugfix
bugzilla: 17618
CVE: NA

-------------------------------------------------

Free the array page if a failure is encountered while creating the
debugfs nodes.
Signed-off-by: NBorislav Petkov <bp@suse.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 b270fd0e
......@@ -511,8 +511,10 @@ void __init cec_init(void)
return;
}
if (create_debugfs_nodes())
if (create_debugfs_nodes()) {
free_page((unsigned long)ce_arr.array);
return;
}
INIT_DELAYED_WORK(&cec_work, cec_work_fn);
schedule_delayed_work(&cec_work, CEC_DECAY_DEFAULT_INTERVAL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册