diff options
author | 2010-10-28 13:50:37 +0400 | |
---|---|---|
committer | 2010-11-06 09:04:33 +0200 | |
commit | 98072e4d977aabe6a39abb95951cd8bf2c2202d5 (patch) | |
tree | a4bbecec358e8ef295ac6df3e626a16218f2d98d /mm | |
parent | slub: Fix build breakage in Documentation/vm (diff) | |
download | linux-98072e4d977aabe6a39abb95951cd8bf2c2202d5.tar.gz linux-98072e4d977aabe6a39abb95951cd8bf2c2202d5.tar.bz2 linux-98072e4d977aabe6a39abb95951cd8bf2c2202d5.zip |
slub: Fix slub_lock down/up imbalance
There are two places, that do not release the slub_lock.
Respective bugs were introduced by sysfs changes ab4d5ed5 (slub: Enable
sysfs support for !CONFIG_SLUB_DEBUG) and 2bce6485 ( slub: Allow removal
of slab caches during boot).
Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slub.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c index 7e657aa19475..7796a0446b3f 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3289,9 +3289,9 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size, kfree(n); kfree(s); } +err: up_write(&slub_lock); -err: if (flags & SLAB_PANIC) panic("Cannot create slabcache %s\n", name); else @@ -3878,6 +3878,7 @@ static ssize_t show_slab_objects(struct kmem_cache *s, x += sprintf(buf + x, " N%d=%lu", node, nodes[node]); #endif + up_read(&slub_lock); kfree(nodes); return x + sprintf(buf + x, "\n"); } |