]> www.infradead.org Git - users/dwmw2/linux.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>
Thu, 7 Nov 2024 04:11:11 +0000 (20:11 -0800)
commit018d24539d9ed7531245a381ba24f5d9e8714682
tree97e5b9de1f08d65dfedcfbb2aa1451f06e5ee838
parentbd40b053fabe27209cb240d205a0c817cbe5fb87
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