mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Mark Lord <liml@rtr.ca>,
	IDE/ATA development list <linux-ide@vger.kernel.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	mingo@elte.hu
Subject: Re: 2.6.19-rc3-git7: scsi_device_unbusy: inconsistent lock state
Date: Mon, 30 Oct 2006 17:31:55 +0100	[thread overview]
Message-ID: <1162225915.2948.49.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <20061030162621.GK4563@kernel.dk>


> > 
> > 
> >  [<c0219091>] cfq_set_request+0x351/0x3b0
> >  [<c020c7fc>] elv_set_request+0x1c/0x40
> >  [<c020fcff>] get_request+0x23f/0x270
> >  [<c0210537>] get_request_wait+0x27/0x120
> >  [<c02107ca>] __make_request+0x5a/0x350
> >  [<c020f40f>] generic_make_request+0x16f/0x220
> >  [<c02117e4>] submit_bio+0x64/0x110
> > 
> > now cfq_set_request() uses several inlines which muddies the situation,
> > but lockdep claims one of them is not done correctly. (eg either it
> > takes the lock incorrectly or something does spin_unlock_irq while the
> > lock is held)
> 
> It's not really inlined trickery, the trace is exactly as printed.

what I meant is that cfq_set_request() calls a few inlines that also
take locks so it might be one of those instead

>  A few
> things may be allocated from that path, so we pass gfp_mask around. I'll
> double check it tonight, but I don't currently see what could be wrong.
> Would lockdep complain about:
> 
>         spin_lock_irqsave(lock, flags);
>         ...
>         spin_unlock_irq(lock);
>         ...
>         spin_lock_irq(lock);
>         ...
>         spin_unlock_irqrestore(lock, flags);

this is fine for lockdep IF and only IF there is no "out lock" held
around this that requires irqs to be off. So if you do

spin_lock_irqsave(lock1, flags);
...
spin_lock_irqsave(lock2, flags);
spin_unlock_irq(lock2)
...

then lockdep WILL complain, and rightfully so, about a violation since
lock1 gets violated here ;)


-- 
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org


  reply	other threads:[~2006-10-30 16:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-30 14:33 Mark Lord
2006-10-30 14:43 ` Jens Axboe
2006-10-30 14:57   ` Arjan van de Ven
2006-10-30 15:44     ` Jens Axboe
2006-10-30 16:16       ` Arjan van de Ven
2006-10-30 16:26         ` Jens Axboe
2006-10-30 16:31           ` Arjan van de Ven [this message]
2006-10-30 17:52             ` Jens Axboe
2006-10-30 17:54               ` Ingo Molnar
2006-10-30 18:03                 ` Jens Axboe
2006-10-30 17:54               ` Mark Lord
2006-10-30 18:11                 ` Mark Lord
2006-10-30 18:16                   ` Jens Axboe
2006-10-30 18:30                     ` Mark Lord
2006-10-30 18:35                       ` Mark Lord
2006-10-30 18:45                       ` Arjan van de Ven
2006-10-30 18:56                         ` Jens Axboe
2006-10-30 18:52                       ` Jens Axboe
2006-10-30 18:59                         ` Mark Lord
2006-10-30 19:04                           ` Jens Axboe
2006-10-30 18:20                   ` Mark Lord
2006-10-30 17:56               ` Arjan van de Ven
2006-10-30 17:57                 ` Ingo Molnar

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=1162225915.2948.49.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=jens.axboe@oracle.com \
    --cc=liml@rtr.ca \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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®