[PATCH] [1/1] slab: fix crash on __drain_alien_cahce() duringCPU Hotplug

From: shin, jacob
Date: Fri Apr 28 2006 - 11:54:52 EST


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 <jacob.shin@xxxxxxx>

---
mm/slab.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- linux.orig/mm/slab.c 2006-04-26 21:19:25.000000000 -0500
+++ linux/mm/slab.c 2006-04-28 09:45:53.000000000 -0500
@@ -979,7 +979,8 @@ static void __drain_alien_cache(struct k
* 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;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/