linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* iw lockdep warning on wireless-testing
@ 2008-06-24  7:39 Zhu Yi
  2008-06-24  8:59 ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Zhu Yi @ 2008-06-24  7:39 UTC (permalink / raw)
  To: linux-wireless

Hi,

I begin to see below lockdep warning on wireless-testing when I use iw
to create a monitor interface with iwl4965. Any clues?

Thanks,
-yi

=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.26-rc6-wl #57
-------------------------------------------------------
iw/2763 is trying to acquire lock:
 (genl_mutex){--..}, at: [<ffffffff81216e4c>] ctrl_dumpfamily+0x31/0xf7

but task is already holding lock:
 (nlk->cb_mutex){--..}, at: [<ffffffff812137c8>] netlink_dump+0x40/0x19d

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (nlk->cb_mutex){--..}:
       [<ffffffff810518cb>] __lock_acquire+0xa4c/0xc28
       [<ffffffff81215774>] netlink_dump_start+0xd9/0x169
       [<ffffffff81051e5d>] lock_acquire+0x51/0x6c
       [<ffffffff81215774>] netlink_dump_start+0xd9/0x169
       [<ffffffff8104eab1>] debug_mutex_lock_common+0x16/0x23
       [<ffffffff8127c622>] mutex_lock_nested+0xde/0x23f
       [<ffffffff81215774>] netlink_dump_start+0xd9/0x169
       [<ffffffff81216d7e>] genl_rcv_msg+0xae/0x14b
       [<ffffffff8127c774>] mutex_lock_nested+0x230/0x23f
       [<ffffffff81216cd0>] genl_rcv_msg+0x0/0x14b
       [<ffffffff8121483a>] netlink_rcv_skb+0x34/0x7c
       [<ffffffff81216fe1>] genl_rcv+0x21/0x30
       [<ffffffff812145ec>] netlink_unicast+0x1f7/0x287
       [<ffffffff811f7eb7>] __alloc_skb+0x84/0x132
       [<ffffffff81214d60>] netlink_sendmsg+0x274/0x287
       [<ffffffff811f1b49>] sock_sendmsg+0xe2/0xff
       [<ffffffff8104582f>] autoremove_wake_function+0x0/0x2e
       [<ffffffff81050878>] mark_held_locks+0x49/0x67
       [<ffffffff811f1d7d>] sys_sendmsg+0x217/0x28a
       [<ffffffff8107de49>] __do_fault+0x35d/0x3a5
       [<ffffffff8100bf10>] tracesys+0xd5/0xda
       [<ffffffffffffffff>] 0xffffffffffffffff

-> #0 (genl_mutex){--..}:
       [<ffffffff81050226>] print_circular_bug_header+0xc8/0xcf
       [<ffffffff810517d0>] __lock_acquire+0x951/0xc28
       [<ffffffff81216e4c>] ctrl_dumpfamily+0x31/0xf7
       [<ffffffff81051e5d>] lock_acquire+0x51/0x6c
       [<ffffffff81216e4c>] ctrl_dumpfamily+0x31/0xf7
       [<ffffffff8104eab1>] debug_mutex_lock_common+0x16/0x23
       [<ffffffff8127c622>] mutex_lock_nested+0xde/0x23f
       [<ffffffff81050a10>] trace_hardirqs_on+0xf3/0x117
       [<ffffffff81216e4c>] ctrl_dumpfamily+0x31/0xf7
       [<ffffffff812137e3>] netlink_dump+0x5b/0x19d
       [<ffffffff81214ef3>] netlink_recvmsg+0x180/0x2a8
       [<ffffffff811f1a48>] sock_recvmsg+0xf0/0x10f
       [<ffffffff8104582f>] autoremove_wake_function+0x0/0x2e
       [<ffffffff81050878>] mark_held_locks+0x49/0x67
       [<ffffffff811f295c>] sys_recvmsg+0x15c/0x254
       [<ffffffff81067ac3>] audit_syscall_entry+0x12d/0x160
       [<ffffffff8127d6da>] trace_hardirqs_on_thunk+0x35/0x3a
       [<ffffffff8100bf10>] tracesys+0xd5/0xda
       [<ffffffffffffffff>] 0xffffffffffffffff

other info that might help us debug this:

1 lock held by iw/2763:
 #0:  (nlk->cb_mutex){--..}, at: [<ffffffff812137c8>] netlink_dump
+0x40/0x19d

stack backtrace:
Pid: 2763, comm: iw Not tainted 2.6.26-rc6-wl #57

Call Trace:
 [<ffffffff8104fe63>] print_circular_bug_tail+0x69/0x72
 [<ffffffff81050226>] print_circular_bug_header+0xc8/0xcf
 [<ffffffff810517d0>] __lock_acquire+0x951/0xc28
 [<ffffffff81216e4c>] ctrl_dumpfamily+0x31/0xf7
 [<ffffffff81051e5d>] lock_acquire+0x51/0x6c
 [<ffffffff81216e4c>] ctrl_dumpfamily+0x31/0xf7
 [<ffffffff8104eab1>] debug_mutex_lock_common+0x16/0x23
 [<ffffffff8127c622>] mutex_lock_nested+0xde/0x23f
 [<ffffffff81050a10>] trace_hardirqs_on+0xf3/0x117
 [<ffffffff81216e4c>] ctrl_dumpfamily+0x31/0xf7
 [<ffffffff812137e3>] netlink_dump+0x5b/0x19d
 [<ffffffff81214ef3>] netlink_recvmsg+0x180/0x2a8
 [<ffffffff811f1a48>] sock_recvmsg+0xf0/0x10f
 [<ffffffff8104582f>] autoremove_wake_function+0x0/0x2e
 [<ffffffff81050878>] mark_held_locks+0x49/0x67
 [<ffffffff811f295c>] sys_recvmsg+0x15c/0x254
 [<ffffffff81067ac3>] audit_syscall_entry+0x12d/0x160
 [<ffffffff8127d6da>] trace_hardirqs_on_thunk+0x35/0x3a
 [<ffffffff8100bf10>] tracesys+0xd5/0xda




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: iw lockdep warning on wireless-testing
  2008-06-24  7:39 iw lockdep warning on wireless-testing Zhu Yi
@ 2008-06-24  8:59 ` Johannes Berg
  2008-06-24  9:05   ` Zhu Yi
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2008-06-24  8:59 UTC (permalink / raw)
  To: Zhu Yi; +Cc: linux-wireless, Thomas Graf, netdev

[-- Attachment #1: Type: text/plain, Size: 4744 bytes --]

Hi,

> I begin to see below lockdep warning on wireless-testing when I use iw
> to create a monitor interface with iwl4965. Any clues?

Yeah I've seen that reported too, but I think it's in genetlink.

> =======================================================
> [ INFO: possible circular locking dependency detected ]
> 2.6.26-rc6-wl #57
> -------------------------------------------------------
> iw/2763 is trying to acquire lock:
>  (genl_mutex){--..}, at: [<ffffffff81216e4c>] ctrl_dumpfamily+0x31/0xf7
> 
> but task is already holding lock:
>  (nlk->cb_mutex){--..}, at: [<ffffffff812137c8>] netlink_dump+0x40/0x19d
> 
> which lock already depends on the new lock.

None of those is anything nl80211 has influence over, afaict.

> 
> the existing dependency chain (in reverse order) is:
> 
> -> #1 (nlk->cb_mutex){--..}:
>        [<ffffffff810518cb>] __lock_acquire+0xa4c/0xc28
>        [<ffffffff81215774>] netlink_dump_start+0xd9/0x169
>        [<ffffffff81051e5d>] lock_acquire+0x51/0x6c
>        [<ffffffff81215774>] netlink_dump_start+0xd9/0x169
>        [<ffffffff8104eab1>] debug_mutex_lock_common+0x16/0x23
>        [<ffffffff8127c622>] mutex_lock_nested+0xde/0x23f
>        [<ffffffff81215774>] netlink_dump_start+0xd9/0x169
>        [<ffffffff81216d7e>] genl_rcv_msg+0xae/0x14b
>        [<ffffffff8127c774>] mutex_lock_nested+0x230/0x23f
>        [<ffffffff81216cd0>] genl_rcv_msg+0x0/0x14b
>        [<ffffffff8121483a>] netlink_rcv_skb+0x34/0x7c
>        [<ffffffff81216fe1>] genl_rcv+0x21/0x30
>        [<ffffffff812145ec>] netlink_unicast+0x1f7/0x287
>        [<ffffffff811f7eb7>] __alloc_skb+0x84/0x132
>        [<ffffffff81214d60>] netlink_sendmsg+0x274/0x287
>        [<ffffffff811f1b49>] sock_sendmsg+0xe2/0xff
>        [<ffffffff8104582f>] autoremove_wake_function+0x0/0x2e
>        [<ffffffff81050878>] mark_held_locks+0x49/0x67
>        [<ffffffff811f1d7d>] sys_sendmsg+0x217/0x28a
>        [<ffffffff8107de49>] __do_fault+0x35d/0x3a5
>        [<ffffffff8100bf10>] tracesys+0xd5/0xda
>        [<ffffffffffffffff>] 0xffffffffffffffff
> 
> -> #0 (genl_mutex){--..}:
>        [<ffffffff81050226>] print_circular_bug_header+0xc8/0xcf
>        [<ffffffff810517d0>] __lock_acquire+0x951/0xc28
>        [<ffffffff81216e4c>] ctrl_dumpfamily+0x31/0xf7
>        [<ffffffff81051e5d>] lock_acquire+0x51/0x6c
>        [<ffffffff81216e4c>] ctrl_dumpfamily+0x31/0xf7
>        [<ffffffff8104eab1>] debug_mutex_lock_common+0x16/0x23
>        [<ffffffff8127c622>] mutex_lock_nested+0xde/0x23f
>        [<ffffffff81050a10>] trace_hardirqs_on+0xf3/0x117
>        [<ffffffff81216e4c>] ctrl_dumpfamily+0x31/0xf7
>        [<ffffffff812137e3>] netlink_dump+0x5b/0x19d
>        [<ffffffff81214ef3>] netlink_recvmsg+0x180/0x2a8
>        [<ffffffff811f1a48>] sock_recvmsg+0xf0/0x10f
>        [<ffffffff8104582f>] autoremove_wake_function+0x0/0x2e
>        [<ffffffff81050878>] mark_held_locks+0x49/0x67
>        [<ffffffff811f295c>] sys_recvmsg+0x15c/0x254
>        [<ffffffff81067ac3>] audit_syscall_entry+0x12d/0x160
>        [<ffffffff8127d6da>] trace_hardirqs_on_thunk+0x35/0x3a
>        [<ffffffff8100bf10>] tracesys+0xd5/0xda
>        [<ffffffffffffffff>] 0xffffffffffffffff
> 
> other info that might help us debug this:
> 
> 1 lock held by iw/2763:
>  #0:  (nlk->cb_mutex){--..}, at: [<ffffffff812137c8>] netlink_dump
> +0x40/0x19d
> 
> stack backtrace:
> Pid: 2763, comm: iw Not tainted 2.6.26-rc6-wl #57
> 
> Call Trace:
>  [<ffffffff8104fe63>] print_circular_bug_tail+0x69/0x72
>  [<ffffffff81050226>] print_circular_bug_header+0xc8/0xcf
>  [<ffffffff810517d0>] __lock_acquire+0x951/0xc28
>  [<ffffffff81216e4c>] ctrl_dumpfamily+0x31/0xf7
>  [<ffffffff81051e5d>] lock_acquire+0x51/0x6c
>  [<ffffffff81216e4c>] ctrl_dumpfamily+0x31/0xf7
>  [<ffffffff8104eab1>] debug_mutex_lock_common+0x16/0x23
>  [<ffffffff8127c622>] mutex_lock_nested+0xde/0x23f
>  [<ffffffff81050a10>] trace_hardirqs_on+0xf3/0x117
>  [<ffffffff81216e4c>] ctrl_dumpfamily+0x31/0xf7
>  [<ffffffff812137e3>] netlink_dump+0x5b/0x19d
>  [<ffffffff81214ef3>] netlink_recvmsg+0x180/0x2a8
>  [<ffffffff811f1a48>] sock_recvmsg+0xf0/0x10f
>  [<ffffffff8104582f>] autoremove_wake_function+0x0/0x2e
>  [<ffffffff81050878>] mark_held_locks+0x49/0x67
>  [<ffffffff811f295c>] sys_recvmsg+0x15c/0x254
>  [<ffffffff81067ac3>] audit_syscall_entry+0x12d/0x160
>  [<ffffffff8127d6da>] trace_hardirqs_on_thunk+0x35/0x3a
>  [<ffffffff8100bf10>] tracesys+0xd5/0xda
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: iw lockdep warning on wireless-testing
  2008-06-24  8:59 ` Johannes Berg
@ 2008-06-24  9:05   ` Zhu Yi
  2008-06-24 15:03     ` Jarek Poplawski
  0 siblings, 1 reply; 4+ messages in thread
From: Zhu Yi @ 2008-06-24  9:05 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Thomas Graf, netdev

On Tue, 2008-06-24 at 10:59 +0200, Johannes Berg wrote:
> > [ INFO: possible circular locking dependency detected ]
> > 2.6.26-rc6-wl #57
> > -------------------------------------------------------
> > iw/2763 is trying to acquire lock:
> >  (genl_mutex){--..}, at: [<ffffffff81216e4c>] ctrl_dumpfamily
> +0x31/0xf7
> > 
> > but task is already holding lock:
> >  (nlk->cb_mutex){--..}, at: [<ffffffff812137c8>] netlink_dump
> +0x40/0x19d
> > 
> > which lock already depends on the new lock.
> 
> None of those is anything nl80211 has influence over, afaict.

Agreed. I can follow the two scenarios below. Apparently it's a ABBA
locking issue. Just don't know which should be the correct sequence for
using with the two locks.

Thanks,
-yi

> > the existing dependency chain (in reverse order) is:
> > 
> > -> #1 (nlk->cb_mutex){--..}:
> >        [<ffffffff810518cb>] __lock_acquire+0xa4c/0xc28
> >        [<ffffffff81215774>] netlink_dump_start+0xd9/0x169
> >        [<ffffffff81051e5d>] lock_acquire+0x51/0x6c
> >        [<ffffffff81215774>] netlink_dump_start+0xd9/0x169
> >        [<ffffffff8104eab1>] debug_mutex_lock_common+0x16/0x23
> >        [<ffffffff8127c622>] mutex_lock_nested+0xde/0x23f
> >        [<ffffffff81215774>] netlink_dump_start+0xd9/0x169
> >        [<ffffffff81216d7e>] genl_rcv_msg+0xae/0x14b
> >        [<ffffffff8127c774>] mutex_lock_nested+0x230/0x23f
> >        [<ffffffff81216cd0>] genl_rcv_msg+0x0/0x14b
> >        [<ffffffff8121483a>] netlink_rcv_skb+0x34/0x7c
> >        [<ffffffff81216fe1>] genl_rcv+0x21/0x30
> >        [<ffffffff812145ec>] netlink_unicast+0x1f7/0x287
> >        [<ffffffff811f7eb7>] __alloc_skb+0x84/0x132
> >        [<ffffffff81214d60>] netlink_sendmsg+0x274/0x287
> >        [<ffffffff811f1b49>] sock_sendmsg+0xe2/0xff
> >        [<ffffffff8104582f>] autoremove_wake_function+0x0/0x2e
> >        [<ffffffff81050878>] mark_held_locks+0x49/0x67
> >        [<ffffffff811f1d7d>] sys_sendmsg+0x217/0x28a
> >        [<ffffffff8107de49>] __do_fault+0x35d/0x3a5
> >        [<ffffffff8100bf10>] tracesys+0xd5/0xda
> >        [<ffffffffffffffff>] 0xffffffffffffffff
> > 
> > -> #0 (genl_mutex){--..}:
> >        [<ffffffff81050226>] print_circular_bug_header+0xc8/0xcf
> >        [<ffffffff810517d0>] __lock_acquire+0x951/0xc28
> >        [<ffffffff81216e4c>] ctrl_dumpfamily+0x31/0xf7
> >        [<ffffffff81051e5d>] lock_acquire+0x51/0x6c
> >        [<ffffffff81216e4c>] ctrl_dumpfamily+0x31/0xf7
> >        [<ffffffff8104eab1>] debug_mutex_lock_common+0x16/0x23
> >        [<ffffffff8127c622>] mutex_lock_nested+0xde/0x23f
> >        [<ffffffff81050a10>] trace_hardirqs_on+0xf3/0x117
> >        [<ffffffff81216e4c>] ctrl_dumpfamily+0x31/0xf7
> >        [<ffffffff812137e3>] netlink_dump+0x5b/0x19d
> >        [<ffffffff81214ef3>] netlink_recvmsg+0x180/0x2a8
> >        [<ffffffff811f1a48>] sock_recvmsg+0xf0/0x10f
> >        [<ffffffff8104582f>] autoremove_wake_function+0x0/0x2e
> >        [<ffffffff81050878>] mark_held_locks+0x49/0x67
> >        [<ffffffff811f295c>] sys_recvmsg+0x15c/0x254
> >        [<ffffffff81067ac3>] audit_syscall_entry+0x12d/0x160
> >        [<ffffffff8127d6da>] trace_hardirqs_on_thunk+0x35/0x3a
> >        [<ffffffff8100bf10>] tracesys+0xd5/0xda
> >        [<ffffffffffffffff>] 0xffffffffffffffff


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: iw lockdep warning on wireless-testing
  2008-06-24  9:05   ` Zhu Yi
@ 2008-06-24 15:03     ` Jarek Poplawski
  0 siblings, 0 replies; 4+ messages in thread
From: Jarek Poplawski @ 2008-06-24 15:03 UTC (permalink / raw)
  To: linux-wireless; +Cc: netdev

Zhu Yi wrote, On 06/24/2008 11:05 AM:

> On Tue, 2008-06-24 at 10:59 +0200, Johannes Berg wrote:
>>> [ INFO: possible circular locking dependency detected ]
>>> 2.6.26-rc6-wl #57
>>> -------------------------------------------------------
>>> iw/2763 is trying to acquire lock:
>>>  (genl_mutex){--..}, at: [<ffffffff81216e4c>] ctrl_dumpfamily
>> +0x31/0xf7
>>> but task is already holding lock:
>>>  (nlk->cb_mutex){--..}, at: [<ffffffff812137c8>] netlink_dump
>> +0x40/0x19d
>>> which lock already depends on the new lock.
>> None of those is anything nl80211 has influence over, afaict.
> 
> Agreed. I can follow the two scenarios below. Apparently it's a ABBA
> locking issue. Just don't know which should be the correct sequence for
> using with the two locks.
> 

It should be fixed by this patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=6d1a3fb567a728d31474636e167c324702a0c38b

Regards,
Jarek P.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-06-24 15:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-24  7:39 iw lockdep warning on wireless-testing Zhu Yi
2008-06-24  8:59 ` Johannes Berg
2008-06-24  9:05   ` Zhu Yi
2008-06-24 15:03     ` Jarek Poplawski

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).