From: Andrew Morton <akpm@osdl.org>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: linux-kernel@vger.kernel.org, Andi Kleen <ak@muc.de>,
Hugh Dickens <hugh@veritas.com>,
Michael Ellerman <michael@ellerman.id.au>,
Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH RFC 1/4] Generic BUG handling.
Date: Thu, 28 Sep 2006 17:07:23 -0700 [thread overview]
Message-ID: <20060928170723.c2580a34.akpm@osdl.org> (raw)
In-Reply-To: <451C5E3B.60204@goop.org>
On Thu, 28 Sep 2006 16:43:55 -0700
Jeremy Fitzhardinge <jeremy@goop.org> wrote:
> Andrew Morton wrote:
> > What is the locking for these lists? I don't see much in here. It has
> > implications for code which wants to do BUG while holding that lock..
> >
>
> There's no locking. This is a direct copy of the original powerpc
> code. I assume, but haven't checked, that there's a lock to serialize
> module loading/unloading, so the insertion/deletion is all properly
> synchronized.
>
> The only other user is traversal when actually handling a bug; if you're
> very unlucky this could happen while you're actually loading/unloading
> and you would see the list in an inconsistent state. I guess we could
> put a lock there, and trylock it on traversal; at least that would stop
> a concurrent modload/unload from getting in there while we're trying to
> walk the list.
The module_bug_cleanup() code is in a stop_machine_run() callback, so
that's all OK.
I _think_ your module_bug_finalize()'s list_add() could race with another
CPU's BUG_ON(). We can live with that.
next prev parent reply other threads:[~2006-09-29 0:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060928225444.439520197@goop.org>
[not found] ` <20060928225452.229936605@goop.org>
2006-09-28 23:32 ` Andrew Morton
2006-09-28 23:43 ` Jeremy Fitzhardinge
2006-09-29 0:07 ` Andrew Morton [this message]
2006-09-29 5:07 ` Michael Ellerman
2006-09-29 8:41 ` Jeremy Fitzhardinge
2006-09-29 8:49 ` Michael Ellerman
2006-09-29 8:52 ` Andrew Morton
2006-09-29 19:44 ` Jeremy Fitzhardinge
2006-09-29 19:54 ` Andrew Morton
2006-09-29 8:57 ` Andi Kleen
2006-09-29 9:10 ` Andrew Morton
2006-09-29 9:13 ` Andi Kleen
2006-09-29 9:18 ` Andrew Morton
2006-09-29 9:16 ` Andrew Morton
2006-09-29 9:33 ` Jeremy Fitzhardinge
2006-09-29 9:36 ` Jeremy Fitzhardinge
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=20060928170723.c2580a34.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=ak@muc.de \
--cc=hugh@veritas.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@ellerman.id.au \
--cc=paulus@samba.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
Powered by JetHome