“72bb6f9b51c82c820ddef892455a85b115460904”上不存在“arch/arm/mach-omap2/omap_device.c”
提交 b2a0e035 编写于 作者: P Peng Wang 提交者: Yang Yingliang

kernfs: fix potential null pointer dereference

mainline inclusion
from mainline-5.4-rc1
commit 2fd60da46da76948b8cc561ae8cc902209686253
category: bugfix
bugzilla: 21637
CVE: NA

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

Get root safely after kn is ensureed to be not null.
Signed-off-by: NPeng Wang <rocking@whu.edu.cn>
Acked-by: NTejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20190708151611.13242-1-rocking@whu.edu.cnSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Nyu kuai <yukuai3@huawei.com>
Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 82552e86
...@@ -431,7 +431,6 @@ struct kernfs_node *kernfs_get_active(struct kernfs_node *kn) ...@@ -431,7 +431,6 @@ struct kernfs_node *kernfs_get_active(struct kernfs_node *kn)
*/ */
void kernfs_put_active(struct kernfs_node *kn) void kernfs_put_active(struct kernfs_node *kn)
{ {
struct kernfs_root *root = kernfs_root(kn);
int v; int v;
if (unlikely(!kn)) if (unlikely(!kn))
...@@ -443,7 +442,7 @@ void kernfs_put_active(struct kernfs_node *kn) ...@@ -443,7 +442,7 @@ void kernfs_put_active(struct kernfs_node *kn)
if (likely(v != KN_DEACTIVATED_BIAS)) if (likely(v != KN_DEACTIVATED_BIAS))
return; return;
wake_up_all(&root->deactivate_waitq); wake_up_all(&kernfs_root(kn)->deactivate_waitq);
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册