mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Jürgen Mell" <j.mell@t-online.de>
Cc: LKML <linux-kernel@vger.kernel.org>, rostedt@goodmis.org
Subject: Re: BUG messages with real-time kernel 2.6.25.8-rt7
Date: Tue, 1 Jul 2008 15:40:43 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0807011507510.27372@gandalf.stny.rr.com> (raw)
In-Reply-To: <200807011947.48725.j.mell@t-online.de>


On Tue, 1 Jul 2008, Jürgen Mell wrote:

>
> I am getting this bug message from a real-time kernel 2.6.25.8-rt7:
>
> Jul  1 07:58:30 cwc-003 kernel: BUG: sleeping function called from invalid
> context IRQ-15(416) at arch/x86/mm/highmem_32.c:8
> Jul  1 07:58:30 cwc-003 kernel: in_atomic():0 [00000000], irqs_disabled():1
> Jul  1 07:58:30 cwc-003 kernel: Pid: 416, comm: IRQ-15 Not tainted
> 2.6.25.8-rt7-hws #2
> Jul  1 07:58:30 cwc-003 kernel:  [<c01125f5>] kmap+0x44/0x54
> Jul  1 07:58:30 cwc-003 kernel:  [<f88507fd>] ata_hsm_move+0x3d5/0x666

[...]

>
> Any ideas how to fix this? If you need any more information or if I can
> test something, please let me know.

I found the problem. In PREEMPT_RT we define kmap_atomic to kmap since we
don't disable interrutps with spin_lock_irqsave nor do we disable
preemption.

In drivers/ata/libata-core.c we have:


		/* FIXME: use bounce buffer */
		local_irq_save(flags);
		buf = kmap_atomic(page, KM_IRQ0);


But PREEMPT_RT even kmap_atomic will call "might_sleep". So the fix here
is for us to get rid of the local_irq_save. Perhaps simply add a
spin_lock_irqsave(local_lock) here.

Thanks for the report.

-- Steve


      reply	other threads:[~2008-07-01 19:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-01 17:47 Jürgen Mell
2008-07-01 19:40 ` Steven Rostedt [this message]

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=Pine.LNX.4.58.0807011507510.27372@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=j.mell@t-online.de \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®