Skip to contentSkip to conversation

mm/highmem: Fix CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP

PATCH Applied [email protected] 2 participants 2 messages Mar 18, 2021 – Mar 19, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/highmem: Fix CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP

From: Ira Weiny <[email protected]>

The kernel test robot found that __kmap_local_sched_out() was not correctly skipping the guard pages when CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP was set.[1] This was due to CONFIG_DEBUG_HIGHMEM check being used.

Change the configuration check to be correct.

[1] https://lore.kernel.org/lkml/20210304083825.GB17830@xsang-OptiPlex-9020/

Cc Thomas Gleixner <[email protected]>
Cc Oliver Sang <[email protected]>
Cc Chaitanya Kulkarni <[email protected]>
Cc David Sterba <[email protected]>
Cc Andrew Morton <[email protected]>
Fixes 0e91a0c6984c ("mm/highmem: Provide CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP")
---
 mm/highmem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/highmem.c +2 -2
index 86f2b9495f9c..6ef8f5e05e7e 100644
@@ -618,7 +618,7 @@ void __kmap_local_sched_out(void)
 		int idx;
 
 		/* With debug all even slots are unmapped and act as guard */
-		if (IS_ENABLED(CONFIG_DEBUG_HIGHMEM) && !(i & 0x01)) {
+		if (IS_ENABLED(CONFIG_DEBUG_KMAP_LOCAL) && !(i & 0x01)) {
 			WARN_ON_ONCE(!pte_none(pteval));
 			continue;
 		}
@@ -654,7 +654,7 @@ void __kmap_local_sched_in(void)
 		int idx;
 
 		/* With debug all even slots are unmapped and act as guard */
-		if (IS_ENABLED(CONFIG_DEBUG_HIGHMEM) && !(i & 0x01)) {
+		if (IS_ENABLED(CONFIG_DEBUG_KMAP_LOCAL) && !(i & 0x01)) {
 			WARN_ON_ONCE(!pte_none(pteval));
 			continue;
 		}
Signature · 1 line
2.28.0.rc0.12.gb6a658bd00c9
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · ira weiny

From: Ira Weiny <[email protected]>

The kernel test robot found that __kmap_local_sched_out() was not correctly skipping the guard pages when CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP was set.[1] This was due to CONFIG_DEBUG_HIGHMEM check being used.

Change the configuration check to be correct.

[1] https://lore.kernel.org/lkml/20210304083825.GB17830@xsang-OptiPlex-9020/

Quoted 8 lines
Cc Thomas Gleixner <[email protected]>
Cc Oliver Sang <[email protected]>
Cc Chaitanya Kulkarni <[email protected]>
Cc David Sterba <[email protected]>
Cc Andrew Morton <[email protected]>
Fixes 0e91a0c6984c ("mm/highmem: Provide CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP")

Thanks,

tglx