mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-24 17:23:25 -05:00
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 072bb0aa5e
("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>
This commit is contained in:
parent
c182ae42cc
commit
51cd8e6ff2
1 changed files with 1 additions and 0 deletions
|
@ -3260,6 +3260,7 @@ force_grow:
|
|||
|
||||
/* cache_grow can reenable interrupts, then ac could change. */
|
||||
ac = cpu_cache_get(cachep);
|
||||
node = numa_mem_id();
|
||||
|
||||
/* no objects in sight? abort */
|
||||
if (!x && (ac->avail == 0 || force_refill))
|
||||
|
|
Loading…
Add table
Reference in a new issue