Skip to content

Commit

Permalink
[PATCH] slab: fix crash on __drain_alien_cahce() during CPU Hotplug
Browse files Browse the repository at this point in the history
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@amd.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
shin, jacob authored and Linus Torvalds committed Apr 28, 2006
1 parent 4de0b1e commit 693f7d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 693f7d3

Please sign in to comment.