public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Lee Revell <rlrevell@joe-job.com>
Cc: root@chaos.analogic.com, linux-kernel@vger.kernel.org
Subject: Re: printk() with a spin-lock held.
Date: Fri, 22 Oct 2004 22:27:46 -0700	[thread overview]
Message-ID: <20041022222746.0313ed9f.akpm@osdl.org> (raw)
In-Reply-To: <1098503815.13176.2.camel@krustophenia.net>

Lee Revell <rlrevell@joe-job.com> wrote:
>
> On Fri, 2004-10-22 at 15:07 -0400, Richard B. Johnson wrote:
> > Linux-2.6.9 will bug-check and halt if my code executes
> > a printk() with a spin-lock held.
> > 
> > Is this the intended behavior?
> 
> Yes.  printk() can sleep.  No sleeping with a spinlock held.
> 

printk() does not sleep and may be called from any context except

a) NMI handlers and

b) when holding a scheduler runqueue->lock while klogd is running.

  reply	other threads:[~2004-10-23  5:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-22 19:07 printk() with a spin-lock held Richard B. Johnson
2004-10-23  3:56 ` Lee Revell
2004-10-23  5:27   ` Andrew Morton [this message]
2004-10-23  7:04     ` Lee Revell
2004-10-23  5:48   ` Nick Piggin
2004-10-25 12:32   ` Richard B. Johnson
2004-10-25 18:41     ` Lee Revell
2004-10-25 19:07       ` linux-os

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=20041022222746.0313ed9f.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rlrevell@joe-job.com \
    --cc=root@chaos.analogic.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