From: Peter Zijlstra <peterz@infradead.org>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, Dave Jones <davej@redhat.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: lockdep: Warning & NULL ptr deref
Date: Tue, 28 Feb 2012 15:26:06 +0100 [thread overview]
Message-ID: <1330439166.11248.92.camel@twins> (raw)
In-Reply-To: <CA+1xoqdRES=RwUw8C+8=6neu7t0JZeBAxSaoT2+VA-Z+pvD6oQ@mail.gmail.com>
On Tue, 2012-02-28 at 16:23 +0200, Sasha Levin wrote:
> On Tue, Feb 28, 2012 at 4:20 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> > On Tue, 2012-02-28 at 16:19 +0200, Sasha Levin wrote:
> >> On Tue, Feb 28, 2012 at 3:29 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> >> > On Tue, 2012-02-28 at 10:24 -0500, Sasha Levin wrote:
> >> >>
> >> >> I'll send some patches to prevent the NULL deref itself which happens
> >> >> since a chunk of the code in lockdep.c assumed hlock_class() can't
> >> >> return NULL.
> >> >>
> >> > There's tons of code actually assuming that..
> >> >
> >> >> This won't fix the actual problem though, I'm not sure exactly how a
> >> >> held lock wouldn't have a class initialized to it.
> >> >
> >> > static inline struct lock_class *hlock_class(struct held_lock *hlock)
> >> > {
> >> > if (!hlock->class_idx) {
> >> > /*
> >> > * Someone passed in garbage, we give up.
> >> > */
> >> > DEBUG_LOCKS_WARN_ON(1);
> >> > return NULL;
> >> > }
> >> > return lock_classes + hlock->class_idx - 1;
> >> > }
> >> >
> >> > Typically that translates to severe memory corruption.
> >>
> >> I can also reproduce it easily by triggering sysrq once or twice after
> >> trinity has stopped.
> >
> > What's trinity ?
>
> Dave Jones' fuzzer tool. The git tree is located here:
> http://codemonkey.org.uk/projects/trinity/trinity.git
Hmm, cute, does a kernel without lockdep explode too? If its proper
memory corruption one would expect that.
next prev parent reply other threads:[~2012-02-28 14:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-28 15:24 Sasha Levin
2012-02-28 13:29 ` Peter Zijlstra
2012-02-28 14:13 ` Sasha Levin
2012-02-28 14:19 ` Sasha Levin
2012-02-28 14:20 ` Peter Zijlstra
2012-02-28 14:23 ` Sasha Levin
2012-02-28 14:26 ` Peter Zijlstra [this message]
2012-02-28 14:55 ` Sasha Levin
2012-02-28 15:08 ` Peter Zijlstra
2012-02-28 16:02 ` Sasha Levin
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=1330439166.11248.92.camel@twins \
--to=peterz@infradead.org \
--cc=davej@redhat.com \
--cc=levinsasha928@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
all inboxes | Powered by JetHome®