Commit 2744b888 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
  slub: Fix slub_lock down/up imbalance
parents 1ca7318c 68cee4f1
...@@ -3273,9 +3273,9 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size, ...@@ -3273,9 +3273,9 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
kfree(n); kfree(n);
kfree(s); kfree(s);
} }
err:
up_write(&slub_lock); up_write(&slub_lock);
err:
if (flags & SLAB_PANIC) if (flags & SLAB_PANIC)
panic("Cannot create slabcache %s\n", name); panic("Cannot create slabcache %s\n", name);
else else
...@@ -3862,6 +3862,7 @@ static ssize_t show_slab_objects(struct kmem_cache *s, ...@@ -3862,6 +3862,7 @@ static ssize_t show_slab_objects(struct kmem_cache *s,
x += sprintf(buf + x, " N%d=%lu", x += sprintf(buf + x, " N%d=%lu",
node, nodes[node]); node, nodes[node]);
#endif #endif
up_read(&slub_lock);
kfree(nodes); kfree(nodes);
return x + sprintf(buf + x, "\n"); return x + sprintf(buf + x, "\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment