All of lore.kernel.org
 help / color / mirror / Atom feed
From: kai@gnukai.com (Kai Meyer)
To: kernelnewbies@lists.kernelnewbies.org
Subject: What does inconsistent lock state mean?
Date: Wed, 07 Dec 2011 16:19:59 -0700	[thread overview]
Message-ID: <4EDFF49F.3060204@gnukai.com> (raw)

I'm getting this when I try to spin_unlock a recently acquired lock with 
spin_lock. IRQs are still somewhat of a mystery to me, and cryptic lock 
state symbols (IN-HARDIRQ-W, HARDIRQ-ON-W) are unintelligible to me.

Dec  7 15:52:20 dev2 kernel: =================================
Dec  7 15:52:20 dev2 kernel: [ INFO: inconsistent lock state ]
Dec  7 15:52:20 dev2 kernel: 2.6.32-220.el6.x86_64.debug #1
Dec  7 15:52:20 dev2 kernel: ---------------------------------
Dec  7 15:52:20 dev2 kernel: inconsistent {IN-HARDIRQ-W} -> 
{HARDIRQ-ON-W} usage.

Looking at lockdep.c isn't giving me any help either. It's obfuscated 
beyond my ability to grok by simply reading the code.

It seems like this portion should help me, but it doesn't....
Dec  7 15:52:20 dev2 kernel: {IN-HARDIRQ-W} state was registered at:
Dec  7 15:52:20 dev2 kernel:  [<ffffffff810afbca>] 
__lock_acquire+0x77a/0x1570
Dec  7 15:52:20 dev2 kernel:  [<ffffffff810b0a64>] lock_acquire+0xa4/0x120
Dec  7 15:52:20 dev2 kernel:  [<ffffffff81520c75>] 
_spin_lock_irqsave+0x55/0xa0
Dec  7 15:52:20 dev2 kernel:  [<ffffffffa006b19b>] blk_done+0x2b/0x110 
[virtio_blk]
Dec  7 15:52:20 dev2 kernel:  [<ffffffffa00401dc>] 
vring_interrupt+0x3c/0xd0 [virtio_ring]
Dec  7 15:52:20 dev2 kernel:  [<ffffffff810ec080>] 
handle_IRQ_event+0x50/0x160
Dec  7 15:52:20 dev2 kernel:  [<ffffffff810ee840>] 
handle_edge_irq+0xe0/0x170
Dec  7 15:52:20 dev2 kernel:  [<ffffffff8100e059>] handle_irq+0x49/0xa0
Dec  7 15:52:20 dev2 kernel:  [<ffffffff81526cdc>] do_IRQ+0x6c/0xf0
Dec  7 15:52:20 dev2 kernel:  [<ffffffff8100ba93>] ret_from_intr+0x0/0x16
Dec  7 15:52:20 dev2 kernel:  [<ffffffff810148e2>] default_idle+0x52/0xc0
Dec  7 15:52:20 dev2 kernel:  [<ffffffff81009e0b>] cpu_idle+0xbb/0x110
Dec  7 15:52:20 dev2 kernel:  [<ffffffff81516623>] 
start_secondary+0x211/0x254

Then later it tells me that I'm holding 1 lock, which is the one that I 
mentioned at the beginning that was just recently locked.

             reply	other threads:[~2011-12-07 23:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-07 23:19 Kai Meyer [this message]
2011-12-08 14:47 ` What does inconsistent lock state mean? Srivatsa Bhat
2011-12-08 18:20   ` Kai Meyer
2011-12-08 18:49     ` Srivatsa Bhat

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=4EDFF49F.3060204@gnukai.com \
    --to=kai@gnukai.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.