From: "Mike Frysinger" <vapier.adi@gmail.com>
To: "Andrew Morton" <akpm@linux-foundation.org>
Cc: "Robin Getz" <rgetz@blackfin.uclinux.org>,
linux-kernel@vger.kernel.org, "Greg Ungerer" <gerg@snapgear.com>,
"Russell King" <rmk@arm.linux.org.uk>,
"Paul Mundt" <lethal@linux-sh.org>,
"Tim Bird" <tim.bird@am.sony.com>,
bryan.wu@analog.com
Subject: Re: early_printk accessing __log_buf
Date: Mon, 23 Jul 2007 18:10:46 -0400 [thread overview]
Message-ID: <8bd0f97a0707231510j52c209e2vf09b023be6e47b1c@mail.gmail.com> (raw)
In-Reply-To: <20070723140541.8fac78c5.akpm@linux-foundation.org>
On 7/23/07, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Mon, 23 Jul 2007 16:54:36 -0400
> "Mike Frysinger" <vapier.adi@gmail.com> wrote:
>
> > On 7/23/07, Andrew Morton <akpm@linux-foundation.org> wrote:
> > > On Mon, 23 Jul 2007 14:19:12 -0400
> > > Robin Getz <rgetz@blackfin.uclinux.org> wrote:
> > >
> > > > On Sun 22 Jul 2007 19:50, Mike Frysinger pondered:
> > > > >
> > > > > i think the attached two functions account for what Robin and Andrew
> > > > > were thinking ...
> > > >
> > > > A note about why/when grab_lock would be set to zero (pre-kernel init, or
> > > > OOPs) might be nice.
> > >
> > > Definitely.
> > >
> > > The pre-kernel init shouldn't be an issue: logbuf_lock is initialised at
> > > compile time.
> > >
> > > At oops time we could possibly use oops_in_progress to work out whether to
> > > avoid taking the lock. That's not terribly nice, but nor is it nice for
> > > callers to know about printk internals.
> >
> > maybe, but for early debug users (the reason we wanted this
> > originally), it wouldnt be an oops in progress ... but i guess we can
> > just as easily set oops_in_progress to 1 in our code before calling
> > this function to keep from having to worry over locks from being
> > doubly grabbed.
>
> I don't immediately see how logbuf_lock could be doubly grabbed. Only if
> you're calling this from hard irq context?
i guess i'm just assuming the worse here and making sure that
something i couldnt conjure up doesnt have the opportunity to bite me
in the ass. doubly grabbed, memory corruption, whatever ... i dont
really have a real scenario as i dont have a very active imagination
;)
-mike
next prev parent reply other threads:[~2007-07-23 22:10 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-18 21:56 Robin Getz
2007-07-18 22:16 ` Andrew Morton
2007-07-18 23:39 ` Robin Getz
2007-07-18 23:53 ` Mike Frysinger
2007-07-19 3:37 ` Robin Getz
2007-07-19 3:47 ` Andrew Morton
2007-07-19 0:26 ` Andrew Morton
2007-07-19 2:26 ` Stephane Couture
2007-07-19 3:58 ` Robin Getz
2007-07-22 23:50 ` Mike Frysinger
2007-07-23 0:14 ` Paul Mundt
2007-07-23 18:19 ` Robin Getz
2007-07-23 20:15 ` Andrew Morton
2007-07-23 20:54 ` Mike Frysinger
2007-07-23 21:05 ` Andrew Morton
2007-07-23 22:10 ` Mike Frysinger [this message]
2007-07-23 22:15 ` Robin Getz
2007-07-23 22:34 ` Andrew Morton
2007-07-24 17:50 ` Robin Getz
2007-07-24 18:12 ` Andrew Morton
2007-07-24 20:12 ` Robin Getz
2007-07-24 21:30 ` Andrew Morton
2007-07-31 7:47 ` Mike Frysinger
2007-07-31 7:59 ` Bryan Wu
2007-07-31 8:11 ` Mike Frysinger
2007-07-31 18:36 ` Andrew Morton
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=8bd0f97a0707231510j52c209e2vf09b023be6e47b1c@mail.gmail.com \
--to=vapier.adi@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bryan.wu@analog.com \
--cc=gerg@snapgear.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rgetz@blackfin.uclinux.org \
--cc=rmk@arm.linux.org.uk \
--cc=tim.bird@am.sony.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 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®