diff options
author | mochel@digitalimplant.org <mochel@digitalimplant.org> | 2005-03-25 03:59:59 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-21 00:15:19 +0200 |
commit | 0293a509405dccecc30783a5d729d615b68d6a77 (patch) | |
tree | 69856eefdaba010e35dd7fbe2e5bb152a110d186 /lib | |
parent | [PATCH] Call klist_del() instead of klist_remove(). (diff) | |
download | linux-0293a509405dccecc30783a5d729d615b68d6a77.tar.xz linux-0293a509405dccecc30783a5d729d615b68d6a77.zip |
[PATCH] Don't reference NULL klist pointer in klist_remove().
Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff -Nru a/lib/klist.c b/lib/klist.c
Diffstat (limited to 'lib')
-rw-r--r-- | lib/klist.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/klist.c b/lib/klist.c index 02177d72dc89..738ab810160a 100644 --- a/lib/klist.c +++ b/lib/klist.c @@ -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); } |