From: shin, jacob Date: Fri, 28 Apr 2006 15:54:37 +0000 (-0500) Subject: [PATCH] slab: fix crash on __drain_alien_cahce() during CPU Hotplug X-Git-Tag: v2.6.17-rc4~109 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=693f7d362055261882659475d2ef022e32edbff1;p=linux-2.6-omap-h63xx.git [PATCH] slab: fix crash on __drain_alien_cahce() during CPU Hotplug transfer_objects should only be called when all of the cpus in the node are online. CPU_DEAD notifier callback marks l3->shared to NULL. Signed-off-by: Jacob Shin Signed-off-by: Linus Torvalds --- diff --git a/mm/slab.c b/mm/slab.c index af5c5237e11..c32af7e7581 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -979,7 +979,8 @@ static void __drain_alien_cache(struct kmem_cache *cachep, * That way we could avoid the overhead of putting the objects * into the free lists and getting them back later. */ - transfer_objects(rl3->shared, ac, ac->limit); + if (rl3->shared) + transfer_objects(rl3->shared, ac, ac->limit); free_block(cachep, ac->entry, ac->avail, node); ac->avail = 0;