]> www.infradead.org Git - users/jedix/linux-maple.git/commit
percpu: fix data race with pcpu_nr_empty_pop_pages
authorDennis Zhou <dennis@kernel.org>
Tue, 8 Oct 2024 00:19:42 +0000 (17:19 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 1 Nov 2024 04:29:01 +0000 (21:29 -0700)
commit0077c0f945c239ed4f60421aa5d563273d436eb0
tree8d1267f27977b9567d2815cc9881b793e5e8a8d1
parentbc5609c795ff8546b98df4c5911352a570c488da
percpu: fix data race with pcpu_nr_empty_pop_pages

Fixes the data race by moving the read to be behind the pcpu_lock. This
is okay because the code (initially) above it will not increase the
empty populated page count because it is populating backing pages that
already have allocations served out of them.

Link: https://lkml.kernel.org/r/20241008001942.8114-1-dennis@kernel.org
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202407191651.f24e499d-oliver.sang@intel.com
Signed-off-by: Dennis Zhou <dennis@kernel.org>
Cc: Christoph Lameter <cl@linux.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/percpu.c