[PATCH] [4/4] SLAB: Fix node add timer race in cache_reap

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andi Kleen
Date: Wednesday, February 3, 2010 - 2:39 pm

cache_reap can run before the node is set up and then reference a NULL 
l3 list. Check for this explicitely and just continue. The node
will be eventually set up.

Signed-off-by: Andi Kleen <ak@linux.intel.com>

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

Index: linux-2.6.33-rc3-ak/mm/slab.c
===================================================================
--- linux-2.6.33-rc3-ak.orig/mm/slab.c
+++ linux-2.6.33-rc3-ak/mm/slab.c
@@ -4112,6 +4112,9 @@ static void cache_reap(struct work_struc
 		 * we can do some work if the lock was obtained.
 		 */
 		l3 = searchp->nodelists[node];
+		/* Note node yet set up */
+		if (!l3)
+			break;
 
 		reap_alien(searchp, l3);
 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] [4/4] SLAB: Fix node add timer race in cache_reap, Andi Kleen, (Wed Feb 3, 2:39 pm)
Re: [PATCH] [3/4] SLAB: Separate node initialization into ..., Christoph Lameter, (Fri Feb 5, 12:15 pm)
Re: [PATCH] [4/4] SLAB: Fix node add timer race in cache_reap, Christoph Lameter, (Fri Feb 5, 12:16 pm)
Re: [PATCH] [0/4] SLAB: Fix a couple of slab memory hotadd ..., Christoph Lameter, (Fri Feb 5, 12:19 pm)