From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kyle Sanderson <kyle.leet@gmail.com>,
Linux-Kernal <linux-kernel@vger.kernel.org>
Subject: Re: Kernel panic - not syncing: Fatal exception in interrupt (file_free_rcu+0x14)
Date: Fri, 29 Sep 2017 09:07:13 -0700 [thread overview]
Message-ID: <20170929160713.GX3521@linux.vnet.ibm.com> (raw)
In-Reply-To: <CA+55aFwwvkmEfC-ZDvLSj51k1YGAOfOyvR820hiHZrz3i8XMVg@mail.gmail.com>
On Thu, Sep 28, 2017 at 09:00:52PM -0700, Linus Torvalds wrote:
> On Thu, Sep 28, 2017 at 8:32 PM, Kyle Sanderson <kyle.leet@gmail.com> wrote:
> > Not sure if the stack is crap or not, but this looks like an RCU crash?
> >
> > https://i.imgur.com/sBnNe1p.jpg
>
> Hmm. Not the clearest picture, and the "Code:" line in particular is
> missing the interesting part, but at a guess it's taking a fault in
> put_cred(), which inlines to
>
> if (atomic_dec_and_test(&(cred)->usage))
> __put_cred(cred);
>
> and I think it's that "cred" pointer that may be NULL, which makes
> "&(cred)->usage" be a NULL pointer too, and you get a page fault when
> it tries to decrement the usage count.
>
> Now, it goes without saying that the cred pointer should never *be*
> NULL on a filp that is on the RCU freeing list, because we always
> initialize file->f_cred when we allocate a file to the current creds.
>
> So there's something odd going on. Possibly entirely unrelated memory
> corruption.
>
> Nothing obvious stands out, I think we'd need to see more of a pattern
> of the problem to see what is up.
Kyle, if this is reproducible, please build your kernel with
CONFIG_DEBUG_OBJECTS_RCU_HEAD=y. This can detect the call_rcu()
equivalent of a double free, and these double frees have sometimes
resulted in output looking something like the .jpg along with the
NULL-pointer problem that Linus suspects.
Thanx, Paul
prev parent reply other threads:[~2017-09-29 16:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-29 3:32 Kernel panic - not syncing: Fatal exception in interrupt (file_free_rcu+0x14) Kyle Sanderson
2017-09-29 4:00 ` Linus Torvalds
2017-09-29 16:07 ` Paul E. McKenney [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=20170929160713.GX3521@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=kyle.leet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--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