LKML Archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	lkft-triage@lists.linaro.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Ira Weiny <ira.weiny@intel.com>,
	Oliver Sang <oliver.sang@intel.com>,
	Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
	x86@kernel.org, Kalesh Singh <kaleshsingh@google.com>
Subject: Re: BUG: unable to handle page fault for address - EIP: __kmap_local_page_prot
Date: Wed, 19 May 2021 21:22:11 +0200	[thread overview]
Message-ID: <20210519192211.GI21560@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <87mtsqd0c1.ffs@nanos.tec.linutronix.de>

On Wed, May 19, 2021 at 08:50:54PM +0200, Thomas Gleixner wrote:
> On Wed, May 19 2021 at 20:38, Naresh Kamboju wrote:
> > While running LTP mm test suite on i386 kernel the following warning and BUG
> > reported on linux next 5.13.0-rc2-next-20210519.
> >
> > The warning is not regression, We have been noticing these warnings often on
> > i386
> 
> Noticing? Did you report them?
> 
> > but kernel BUG: looks to be a new crash.
> 
> It's just the consequence of the problem which is pointed out by the
> warning. Fix below.

Maybe something like so as well?

---
 mm/mremap.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/mm/mremap.c b/mm/mremap.c
index 47c255b60150..477a908bdb6b 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -210,6 +210,10 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
 }
 
 #ifdef CONFIG_HAVE_MOVE_PMD
+#if CONFIG_PGTABLE_LEVELS < 2
+#error "Can't very well move non-existant pgtable levels"
+#endif
+
 static bool move_normal_pmd(struct vm_area_struct *vma, unsigned long old_addr,
 		  unsigned long new_addr, pmd_t *old_pmd, pmd_t *new_pmd)
 {
@@ -277,6 +281,10 @@ static inline bool move_normal_pmd(struct vm_area_struct *vma,
 #endif
 
 #ifdef CONFIG_HAVE_MOVE_PUD
+#if CONFIG_PGTABLE_LEVELS < 3
+#error "Can't very well move non-existant pgtable levels"
+#endif
+
 static bool move_normal_pud(struct vm_area_struct *vma, unsigned long old_addr,
 		  unsigned long new_addr, pud_t *old_pud, pud_t *new_pud)
 {

  parent reply	other threads:[~2021-05-19 19:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 15:08 BUG: unable to handle page fault for address - EIP: __kmap_local_page_prot Naresh Kamboju
2021-05-19 15:31 ` Matthew Wilcox
     [not found] ` <87mtsqd0c1.ffs@nanos.tec.linutronix.de>
2021-05-19 19:22   ` Peter Zijlstra [this message]
2021-05-20  7:10   ` Naresh Kamboju
2021-05-20 12:51     ` Thomas Gleixner
2021-05-20 13:04       ` Naresh Kamboju

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210519192211.GI21560@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=akpm@linux-foundation.org \
    --cc=ira.weiny@intel.com \
    --cc=kaleshsingh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=oliver.sang@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).