Messages in this thread | | | Date | Tue, 1 Jul 2008 15:40:43 -0400 (EDT) | From | Steven Rostedt <> | Subject | Re: BUG messages with real-time kernel 2.6.25.8-rt7 |
| |
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
-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |