提交 0293a509 编写于 作者: M mochel@digitalimplant.org 提交者: Greg Kroah-Hartman

[PATCH] Don't reference NULL klist pointer in klist_remove().

Signed-off-by: NPatrick Mochel <mochel@digitalimplant.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>

diff -Nru a/lib/klist.c b/lib/klist.c
上级 0956af53
......@@ -145,9 +145,10 @@ EXPORT_SYMBOL_GPL(klist_del);
void klist_remove(struct klist_node * n)
{
spin_lock(&n->n_klist->k_lock);
struct klist * k = n->n_klist;
spin_lock(&k->k_lock);
klist_dec_and_del(n);
spin_unlock(&n->n_klist->k_lock);
spin_unlock(&k->k_lock);
wait_for_completion(&n->n_removed);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册