linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: mingo@elte.hu (Ingo Molnar)
Cc: davem@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [lock validator] net/ipv4/fib_hash.c: illegal {enabled-softirqs} -> {used-in-softirq} usage?
Date: Fri, 27 Jan 2006 12:41:47 +1100	[thread overview]
Message-ID: <E1F2IcV-0007Iq-00@gondolin.me.apana.org.au> (raw)
In-Reply-To: <20060127001807.GA17179@elte.hu>

Ingo Molnar <mingo@elte.hu> wrote:
> the lock validator i'm working on found another item:
> 
>  ============================
>  [ BUG: illegal lock usage! ]
>  ----------------------------
>  illegal {enabled-softirqs} -> {used-in-softirq} usage.
>  hackbench/8407 [HC0[0]:SC1[2]:HE1:SE0] takes:
>   {&state[i].lock} [<c0bf7d08>] wrandom_flush+0x2a/0xb3
>  {enabled-softirqs} state was registered at:
>   [<c0befc33>] fn_hash_insert+0x565/0x5c3
>  hardirqs last enabled at: [<c0d29a36>] _spin_unlock_irq+0xd/0x10
>  softirqs last enabled at: [<c012d0a0>] irq_exit+0x36/0x38
>  
>  other info that might help us debug this:
>  locks held by hackbench/8407: <none>
>  
>  stack backtrace:
>   [<c0103e86>] show_trace+0xd/0xf
>   [<c0103e9d>] dump_stack+0x15/0x17
>   [<c013eb40>] print_usage_bug+0x16d/0x177
>   [<c013f130>] mark_lock+0xe3/0x248
>   [<c013f65d>] debug_lock_chain+0x3c8/0xb1d
>   [<c013fde3>] debug_lock_chain_spin+0x31/0x48
>   [<c0410c4e>] _raw_spin_lock+0x34/0x7f
>   [<c0d298fd>] _spin_lock+0x8/0xa
>   [<c0bf7d08>] wrandom_flush+0x2a/0xb3

Good catch.  In fact the other spin lock operation in the same file needs
BH protection as well since it is invoked by the output route path which
can be in user-context for local packets.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2006-01-27  1:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-27  0:18 [lock validator] net/ipv4/fib_hash.c: illegal {enabled-softirqs} -> {used-in-softirq} usage? Ingo Molnar
2006-01-27  1:41 ` Herbert Xu [this message]
2006-01-28 15:22   ` [lock validator] inet6_destroy_sock(): soft-safe -> soft-unsafe lock dependency Ingo Molnar
2006-01-28 15:44     ` Ingo Molnar
2006-01-31 10:27     ` Herbert Xu
2006-01-31 10:43       ` David S. Miller
2006-01-31 11:21         ` Ingo Molnar
2006-02-01 13:32         ` Ingo Molnar
2006-02-01 20:26           ` Herbert Xu
2006-02-02  7:46             ` Ingo Molnar
2006-02-02  8:48               ` Herbert Xu
2006-02-02  9:04                 ` David S. Miller
2006-02-02 10:54                 ` Ingo Molnar
2006-02-02 11:27                   ` Ingo Molnar
2006-02-02 12:19                     ` Herbert Xu
2006-02-02 12:17                   ` Herbert Xu
2006-02-02 13:54                     ` Ingo Molnar
2006-01-31 21:24       ` Ingo Molnar
2006-01-31 22:06         ` Herbert Xu
2006-02-01 10:42         ` Herbert Xu
2006-02-01 11:13           ` Ingo Molnar
2006-02-03  1:01           ` David S. Miller

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=E1F2IcV-0007Iq-00@gondolin.me.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@redhat.com \
    --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;
as well as URLs for NNTP newsgroup(s).