Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm, slab: lock the correct nodelist after reenabling irqs

cache_grow() can reenable irqs so the cpu (and node) can change, so ensure
that we take list_lock on the correct nodelist.

This fixes an issue with commit 072bb0aa5e06 ("mm: sl[au]b: add
knowledge of PFMEMALLOC reserve pages") where list_lock for the wrong
node was taken after growing the cache.

Reported-and-tested-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

David Rientjes and committed by
Linus Torvalds
51cd8e6f c182ae42

+1
+1
mm/slab.c
··· 3260 3260 3261 3261 /* cache_grow can reenable interrupts, then ac could change. */ 3262 3262 ac = cpu_cache_get(cachep); 3263 + node = numa_mem_id(); 3263 3264 3264 3265 /* no objects in sight? abort */ 3265 3266 if (!x && (ac->avail == 0 || force_refill))