[patch] lockdep: annotate idescsi_pc_intr()

From: Ingo Molnar
Date: Fri Aug 25 2006 - 06:21:09 EST



* J. Bruce Fields <bfields@xxxxxxxxxxxx> wrote:

> ide-scsi is deprecated for cd burning! Use ide-cd and give dev=/dev/hdX as device
> scsi0 : SCSI host adapter emulation for IDE ATAPI devices
> BUG: warning at kernel/lockdep.c:1803/trace_hardirqs_on()
> [<c0103df6>] show_trace+0x16/0x20
> [<c0103ecb>] dump_stack+0x1b/0x20
> [<c012e997>] trace_hardirqs_on+0xf7/0x130
> [<c0445e63>] idescsi_pc_intr+0x63/0x450
> [<c042fe5c>] ide_intr+0x7c/0x1d0
> [<c013a727>] handle_IRQ_event+0x27/0x60
> [<c013a7f4>] __do_IRQ+0x94/0x110
> [<c0104cba>] do_IRQ+0xaa/0xf0
> [<c0103105>] common_interrupt+0x25/0x30
> [<c010d6c9>] apm_cpu_idle+0x1e9/0x270
> [<c010163c>] cpu_idle+0x2c/0x80
> [<c0100507>] rest_init+0x37/0x40
> [<c0823756>] start_kernel+0x266/0x2b0
> [<c0100199>] 0xc0100199
> Vendor: PIONEER Model: DVD-ROM DVD-116 Rev: 1.22
> Type: CD-ROM ANSI SCSI revision: 00

the patch below should get rid of the warning above.

Ingo

-------->
Subject: lockdep: annotate idescsi_pc_intr()
From: Ingo Molnar <mingo@xxxxxxx>

idescsi_pc_intr() uses local_irq_enable() in IRQ context: annotate it.

(this has no effect on kernels with lockdep disabled. On kernels with
lockdep enabled this means that we wont actually disable interrupts,
and the warning message will go away as well.)

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
drivers/scsi/ide-scsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/drivers/scsi/ide-scsi.c
===================================================================
--- linux.orig/drivers/scsi/ide-scsi.c
+++ linux/drivers/scsi/ide-scsi.c
@@ -517,7 +517,7 @@ static ide_startstop_t idescsi_pc_intr (
/* No more interrupts */
if (test_bit(IDESCSI_LOG_CMD, &scsi->log))
printk (KERN_INFO "Packet command completed, %d bytes transferred\n", pc->actually_transferred);
- local_irq_enable();
+ local_irq_enable_in_hardirq();
if (status.b.check)
rq->errors++;
idescsi_end_request (drive, 1, 0);
-
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/