mm, slub: validate slab from partial list or page allocator before making it cpu...
authorVlastimil Babka <vbabka@suse.cz>
Tue, 11 May 2021 14:37:51 +0000 (16:37 +0200)
committerVlastimil Babka <vbabka@suse.cz>
Fri, 3 Sep 2021 23:12:21 +0000 (01:12 +0200)
commit3f2b77e35a4fc3c83132a1a1a2fc7a2c803a2514
tree2bdf0cd31e03808ce4b73f9eb251c9286ca061bf
parent6c1dbb674c5cf76d23381160577d34bead60b76b
mm, slub: validate slab from partial list or page allocator before making it cpu slab

When we obtain a new slab page from node partial list or page allocator, we
assign it to kmem_cache_cpu, perform some checks, and if they fail, we undo
the assignment.

In order to allow doing the checks without irq disabled, restructure the code
so that the checks are done first, and kmem_cache_cpu.page assignment only
after they pass.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
mm/slub.c