From: Peter Zijlstra <peterz@infradead.org>
To: Michael Wu <flamingice@sourmilk.net>
Cc: "Luis R. Rodriguez" <mcgrof@gmail.com>,
linux-wireless <linux-wireless@vger.kernel.org>,
"John W. Linville" <linville@tuxdriver.com>,
Ingo Molnar <mingo@redhat.com>,
Johannes Berg <johannes@sipsolutions.net>,
linux-kernel@vger.kernel.org
Subject: Re: RFC: Reproducible oops with lockdep on count_matching_names()
Date: Fri, 02 Nov 2007 11:58:40 +0100 [thread overview]
Message-ID: <1194001120.27652.353.camel@twins> (raw)
In-Reply-To: <200711011926.07641.flamingice@sourmilk.net>
On Thu, 2007-11-01 at 19:26 -0400, Michael Wu wrote:
> On Thursday 01 November 2007 15:17:16 Luis R. Rodriguez wrote:
> > mcgrof@pogo:~/devel/wireless-2.6$ git-describe
> > v2.6.24-rc1-146-g2280253
> >
> > So I hit segfault with lockdep on count_matching_names() on the
> > strcmp() multiple times now. This is reproducible and with different
> > wireless drivers.
> >
> I've found the problem. It appears to be in lockdep. struct lock_class has a
> const char *name field which points to a statically allocated string that
> comes from the code which uses the lock. If that code/string is in a module
> and gets unloaded, the pointer in |name| is no longer valid. Next time this
> field is dereferenced (count_matching_names, in this case), we crash.
>
> The following patch fixes the issue but there's probably a better way.
Thanks, and indeed. From my understanding lockdep_free_key_range()
should destroy all classes of a module on module unload.
So I'm not quite sure what has gone wrong here..
next prev parent reply other threads:[~2007-11-02 10:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-01 19:17 RFC: Reproducible oops with lockdep on count_matching_names() Luis R. Rodriguez
2007-11-01 19:49 ` John W. Linville
2007-11-01 21:29 ` Luis R. Rodriguez
2007-11-01 23:26 ` Michael Wu
2007-11-02 10:58 ` Peter Zijlstra [this message]
2007-11-03 19:58 ` Luis R. Rodriguez
2007-11-03 20:06 ` Michael Buesch
2007-11-03 20:06 ` Michael Buesch
2007-11-05 12:00 ` Peter Zijlstra
2007-11-05 12:00 ` Peter Zijlstra
2007-11-05 12:23 ` Pekka Enberg
2007-11-05 12:23 ` Pekka Enberg
2007-11-05 13:03 ` Michael Buesch
2007-11-05 13:03 ` Michael Buesch
2007-11-05 13:56 ` Pekka Enberg
2007-11-05 13:56 ` Pekka Enberg
2007-11-05 14:26 ` Michael Buesch
2007-11-05 14:26 ` Michael Buesch
2007-11-05 18:47 ` Christoph Lameter
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=1194001120.27652.353.camel@twins \
--to=peterz@infradead.org \
--cc=flamingice@sourmilk.net \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@gmail.com \
--cc=mingo@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.