mm/gup: Fix the lockless PMD access
authorPeter Zijlstra <peterz@infradead.org>
Thu, 26 Nov 2020 16:21:30 +0000 (17:21 +0100)
committerDave Hansen <dave.hansen@linux.intel.com>
Thu, 15 Dec 2022 18:37:27 +0000 (10:37 -0800)
commit1180e732c985ed3c8866d2fd9e02b619848404a0
treed7ce6ce20c24e7c941683d8e5816337d9deb6515
parentdab6e717429e5ec795d558a0e9a5337a1ed33a3d
mm/gup: Fix the lockless PMD access

On architectures where the PTE/PMD is larger than the native word size
(i386-PAE for example), READ_ONCE() can do the wrong thing. Use
pmdp_get_lockless() just like we use ptep_get_lockless().

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20221022114424.906110403%40infradead.org
kernel/events/core.c
mm/gup.c