From: "Kani, Toshi" <toshi.kani@hpe.com>
To: "luto@kernel.org" <luto@kernel.org>
Cc: "mingo@kernel.org" <mingo@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"julia.cartwright@ni.com" <julia.cartwright@ni.com>,
"torvalds@linux-foundation.org" <torvalds@linux-foundation.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"bp@suse.de" <bp@suse.de>,
"gratian.crisan@ni.com" <gratian.crisan@ni.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"hpa@zytor.com" <hpa@zytor.com>,
"brgerst@gmail.com" <brgerst@gmail.com>,
"dave.hansen@intel.com" <dave.hansen@intel.com>,
"dvlasenk@redhat.com" <dvlasenk@redhat.com>,
"gratian@gmail.com" <gratian@gmail.com>
Subject: Re: Kernel page fault in vmalloc_fault() after a preempted ioremap
Date: Thu, 8 Mar 2018 23:08:34 +0000 [thread overview]
Message-ID: <1520553209.2693.110.camel@hpe.com> (raw)
In-Reply-To: <CALCETrUB0brd92Tuv_cgakTgBo8yXxaAC1eLUMePMNsoWPK+mw@mail.gmail.com>
On Thu, 2018-03-08 at 22:38 +0000, Andy Lutomirski wrote:
> On Thu, Mar 8, 2018 at 9:43 PM, Kani, Toshi <toshi.kani@hpe.com> wrote:
> > On Thu, 2018-03-08 at 14:34 -0600, Gratian Crisan wrote:
:
> >
> > Thanks for the report and analysis! I believe pud_large() and
> > pmd_large() should have been used here. I will try to reproduce the
> > issue and verify the fix.
>
> Indeed. I find myself wondering why pud_huge() exists at all.
>
> While you're at it, I think there may be more bugs in there.
> Specifically, the code walks the reference and current tables at the
> same time without any synchronization and without READ_ONCE()
> protection. I think that all of the BUG() calls below the comment:
>
> /*
> * Below here mismatches are bugs because these lower tables
> * are shared:
> */
>
> are bogus and could be hit due to races. I also think they're
> pointless -- we've already asserted that the reference and loaded
> tables are literally the same pointers. I think the right fix is to
> remove pud_ref, pmd_ref and pte_ref entirely and to get rid of those
> BUG() calls.
>
> What do you think?
I agree that these BUG() checks are pointless. I will remove them in
this opportunity.
Thanks,
-Toshi
prev parent reply other threads:[~2018-03-08 23:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-08 20:34 Gratian Crisan
2018-03-08 21:43 ` Kani, Toshi
2018-03-08 22:38 ` Andy Lutomirski
2018-03-08 23:08 ` Kani, Toshi [this message]
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=1520553209.2693.110.camel@hpe.com \
--to=toshi.kani@hpe.com \
--cc=akpm@linux-foundation.org \
--cc=bp@suse.de \
--cc=brgerst@gmail.com \
--cc=dave.hansen@intel.com \
--cc=dvlasenk@redhat.com \
--cc=gratian.crisan@ni.com \
--cc=gratian@gmail.com \
--cc=hpa@zytor.com \
--cc=julia.cartwright@ni.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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