Re: [patch] warn on release_region() from irq context

From: Ingo Molnar
Date: Sun Jan 29 2006 - 08:05:02 EST



* Ingo Molnar <mingo@xxxxxxx> wrote:

> ============================
> [ BUG: illegal lock usage! ]
> ----------------------------
> illegal {softirq-on} -> {in-softirq} usage.
> rcu_torture_rea/264 [HC0[0]:SC1[2]:HE1:SE0] takes:
> (resource_lock){+-}, at: [<c0123997>] __release_region+0x37/0xf0
> {softirq-on} state was registered at:
> [<c0122c85>] irq_exit+0x45/0x50
> hardirqs last enabled at: [<c011d39e>] vprintk+0x32e/0x3e0
> softirqs last enabled at: [<c0122c85>] irq_exit+0x45/0x50
>
> other info that might help us debug this:
> no locks held by rcu_torture_rea/264.
>
> stack backtrace:
> [<c010432d>] show_trace+0xd/0x10
> [<c0104347>] dump_stack+0x17/0x20
> [<c0139078>] print_usage_bug+0x1d8/0x230
> [<c0139436>] mark_lock+0x366/0x3a0
> [<c0139903>] debug_lock_chain+0x493/0x1090
> [<c013a53d>] debug_lock_chain_spin+0x3d/0x60
> [<c0268522>] _raw_write_lock+0x32/0x1a0
> [<c04dc158>] _write_lock+0x8/0x10
> [<c0123997>] __release_region+0x37/0xf0
> [<c02f5010>] floppy_release_irq_and_dma+0x140/0x200
> [<c02f3577>] set_dor+0xc7/0x1b0
> [<c02f65e1>] motor_off_callback+0x21/0x30
> [<c01276c5>] run_timer_softirq+0xf5/0x1f0
> [<c0122fc7>] __do_softirq+0x97/0x130
> [<c01054a9>] do_softirq+0x69/0x100

btw., Arjan discovered that this bug is not theoretical, and the
deadlock scenario is experienced by users:

http://i15.photobucket.com/albums/a396/johnny_blue/fedora-devel/28012006026.jpg

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/