aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorSteven Price <[email protected]>2020-04-07 03:08:43 +0000
committerLinus Torvalds <[email protected]>2020-04-07 17:43:41 +0000
commit3f3673d7d324d872d9d8ddb73b3e5e47fbf12e0d (patch)
treea47842c1923bef662142c16fdf2446af46f3bd10 /fs/proc/array.c
parentmm: use fallthrough; (diff)
downloadkernel-3f3673d7d324d872d9d8ddb73b3e5e47fbf12e0d.tar.gz
kernel-3f3673d7d324d872d9d8ddb73b3e5e47fbf12e0d.zip
include/linux/swapops.h: correct guards for non_swap_entry()
If CONFIG_DEVICE_PRIVATE is defined, but neither CONFIG_MEMORY_FAILURE nor CONFIG_MIGRATION, then non_swap_entry() will return 0, meaning that the condition (non_swap_entry(entry) && is_device_private_entry(entry)) in zap_pte_range() will never be true even if the entry is a device private one. Equally any other code depending on non_swap_entry() will not function as expected. I originally spotted this just by looking at the code, I haven't actually observed any problems. Looking a bit more closely it appears that actually this situation (currently at least) cannot occur: DEVICE_PRIVATE depends on ZONE_DEVICE ZONE_DEVICE depends on MEMORY_HOTREMOVE MEMORY_HOTREMOVE depends on MIGRATION Fixes: 5042db43cc26 ("mm/ZONE_DEVICE: new type of ZONE_DEVICE for unaddressable memory") Signed-off-by: Steven Price <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Cc: Jérôme Glisse <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Dan Williams <[email protected]> Cc: John Hubbard <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/proc/array.c')
0 files changed, 0 insertions, 0 deletions