Re: 2.6.19-rc3-git7: scsi_device_unbusy: inconsistent lock state



Jens Axboe wrote:
I looked over them, and cfq_cic_link() should use _irqsave() instead of
_irq() if called without __GFP_WAIT set. That doesn't happen in the
normal io path though, so I'm not sure that is it.

So if the bug is using spin_lock_irq() with interrupts already disabled,
iirc that would trigger a different warning...
..

This seems 100% reproduceable here, so if there's any specific instrumentation
that might be useful, just let me know. Meanwhile I'll try Jen's patch (below).

-ml


diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 4bae64e..da9bddf 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1355,6 +1355,7 @@ cfq_cic_link(struct cfq_data *cfqd, stru
struct rb_node **p;
struct rb_node *parent;
struct cfq_io_context *__cic;
+ unsigned long flags;
void *k;
cic->ioc = ioc;
@@ -1384,9 +1385,9 @@ restart:
rb_link_node(&cic->rb_node, parent, p);
rb_insert_color(&cic->rb_node, &ioc->cic_root);
- spin_lock_irq(cfqd->queue->queue_lock);
+ spin_lock_irqsave(cfqd->queue->queue_lock, flags);
list_add(&cic->queue_list, &cfqd->cic_list);
- spin_unlock_irq(cfqd->queue->queue_lock);
+ spin_unlock_irqrestore(cfqd->queue->queue_lock, flags);
}
-
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/



Relevant Pages

  • Re: Contiki developer needs help on mouse programming !
    ... this bug but it is not supposed to happen on a IIgs (well, ... posted so the bug shouldn't show up. ... The last line of Mouse Tech note #4 says, "The Apple IIgs does not have this ... increment $0402 on those interrupts. ...
    (comp.sys.apple2.programmer)
  • Re: 2.6.23-rc1: BUG_ON in kmap_atomic_prot()
    ... On Tue, Jul 24 2007, Jens Axboe wrote: ... So maybe I goofed, and that BUG_ON is triggering (it scrolled off, and I am ... there's a km type bug there. ... or one of the irq variants without disabling interrupts. ...
    (Linux-Kernel)
  • Re: Anonymous and local class names changed in 1.5
    ... >I don't see any bug. ... The change to local class names in 1.4.2 *was* a ... >bugfix, IIRC, because the previous names could be ambiguous, but the 1.4.2. ...
    (comp.lang.java.programmer)
  • Re: Realtime Preemption, 2.6.12, Beginners Guide?
    ... > configuration, but it was a bug, and this patch fixes it. ... because timer interrupts should always occur ... but there's another side-effect of the ACPI-idle bug: ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: VS.Net 2005: Uses regsvr32 with undocumented options and fails to register
    ... >> COM object registration requires administrative privileges. ... > IIRC this is only if you register under HKCR. ... >>> So to add pain to this access right bug, ...
    (microsoft.public.vc.language)