diff options
author | Pavel Emelyanov <xemul@parallels.com> | 2010-10-28 13:50:37 +0400 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2010-11-14 16:53:11 +0200 |
commit | 68cee4f118c21a1c67e5764a91d766661db5b360 (patch) | |
tree | 17c487ce969cc66a4be5048ed12cb5ec070c2fc2 /mm/slub.c | |
parent | c8ddb2713c624f432fa5fe3c7ecffcdda46ea0d4 (diff) | |
download | op-kernel-dev-68cee4f118c21a1c67e5764a91d766661db5b360.zip op-kernel-dev-68cee4f118c21a1c67e5764a91d766661db5b360.tar.gz |
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/slub.c')
-rw-r--r-- | mm/slub.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3273,9 +3273,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 @@ -3862,6 +3862,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"); } |