Skip to content

Commit

Permalink
Merge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/penberg/linux

Pull SLAB fix from Pekka Enberg:
 "This contains a lockdep false positive fix from Jiri Kosina I missed
  from the previous pull request."

* 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux:
  mm, slab: release slab_mutex earlier in kmem_cache_destroy()
  • Loading branch information
torvalds committed Oct 12, 2012
2 parents 03d3602 + 210ed9d commit 3dc329b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mm/slab_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,19 +168,22 @@ void kmem_cache_destroy(struct kmem_cache *s)
list_del(&s->list);

if (!__kmem_cache_shutdown(s)) {
mutex_unlock(&slab_mutex);
if (s->flags & SLAB_DESTROY_BY_RCU)
rcu_barrier();

kfree(s->name);
kmem_cache_free(kmem_cache, s);
} else {
list_add(&s->list, &slab_caches);
mutex_unlock(&slab_mutex);
printk(KERN_ERR "kmem_cache_destroy %s: Slab cache still has objects\n",
s->name);
dump_stack();
}
} else {
mutex_unlock(&slab_mutex);
}
mutex_unlock(&slab_mutex);
put_online_cpus();
}
EXPORT_SYMBOL(kmem_cache_destroy);
Expand Down

0 comments on commit 3dc329b

Please sign in to comment.