Message ID | 20210318230657.1497881-1-ira.weiny@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mm/highmem: Fix CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP | expand |
On Thu, Mar 18 2021 at 16:06, ira weiny wrote: > From: Ira Weiny <ira.weiny@intel.com> > > 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 <tglx@linutronix.de> > Cc: Oliver Sang <oliver.sang@intel.com> > Cc: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com> > Cc: David Sterba <dsterba@suse.com> > Cc: Andrew Morton <akpm@linux-foundation.org> > Fixes: 0e91a0c6984c ("mm/highmem: Provide CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP") > Reported-by: kernel test robot <oliver.sang@intel.com> > Signed-off-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable@vger.kernel.org Thanks, tglx
diff --git a/mm/highmem.c b/mm/highmem.c index 86f2b9495f9c..6ef8f5e05e7e 100644 --- a/mm/highmem.c +++ b/mm/highmem.c @@ -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; }