Re: netlink locking warnings in 2.6.21-rc7-mm1

2007-04-25 Thread Andrew Morton
On Wed, 25 Apr 2007 22:51:43 +0200 Patrick McHardy <[EMAIL PROTECTED]> wrote: > I think I found the problem, the rtnl_mutex was reinitialized on every > rtnetlink socket creation. This is most likely responsible for both > warnings. Yup, no warnings any more, thanks. - To unsubscribe from this li

Re: netlink locking warnings in 2.6.21-rc7-mm1

2007-04-25 Thread David Miller
From: Patrick McHardy <[EMAIL PROTECTED]> Date: Wed, 25 Apr 2007 22:51:43 +0200 > [NETLINK]: don't reinitialize callback mutex > > Don't reinitialize the callback mutex the netlink_kernel_create caller > handed in, it is supposed to already be initialized and could already > be held by someone. >

Re: netlink locking warnings in 2.6.21-rc7-mm1

2007-04-25 Thread Patrick McHardy
Andrew Morton wrote: > I just retested bare net-2.6.22, pulled 30 minutes ago. I got just one > warning: > > BUG: at kernel/mutex-debug.c:82 debug_mutex_unlock() > [] debug_mutex_unlock+0x5a/0x134 > [] __mutex_unlock_slowpath+0x9d/0xcf > [] ipw_wx_set_encode+0x0/0x82 [ipw2200] > [] rtnl_unloc

Re: netlink locking warnings in 2.6.21-rc7-mm1

2007-04-25 Thread Andrew Morton
I just retested bare net-2.6.22, pulled 30 minutes ago. I got just one warning: PM: Removing info for No Bus::06:0b.0 eth0: no IPv6 routers present ipw2200: Radio Frequency Kill Switch is On: Kill switch must be turned off for wireless networking to work. PM: Adding info for No Bus:eth1 ipw

Re: netlink locking warnings in 2.6.21-rc7-mm1

2007-04-25 Thread Patrick McHardy
Herbert Xu wrote: > David Miller <[EMAIL PROTECTED]> wrote: > >>I think I see what might be the problem, nlk->cb_mutex is set >>to "rtnl_mutex" and this is used for other purposes in various >>code paths here, maybe there is a double mutex_unlock() or >>similar due to that? > > > Indeed, the RTN

Re: netlink locking warnings in 2.6.21-rc7-mm1

2007-04-25 Thread Patrick McHardy
David Miller wrote: > I think I see what might be the problem, nlk->cb_mutex is set > to "rtnl_mutex" and this is used for other purposes in various > code paths here, maybe there is a double mutex_unlock() or > similar due to that? Nothing in the callbacks should be touching the rtnl, that would

Re: netlink locking warnings in 2.6.21-rc7-mm1

2007-04-24 Thread Herbert Xu
David Miller <[EMAIL PROTECTED]> wrote: > > Is it illegal to sleep with a mutex held? Shouldn't be. > I think I see what might be the problem, nlk->cb_mutex is set > to "rtnl_mutex" and this is used for other purposes in various > code paths here, maybe there is a double mutex_unlock() or > sim

Re: netlink locking warnings in 2.6.21-rc7-mm1

2007-04-24 Thread Andrew Morton
On Tue, 24 Apr 2007 14:20:08 -0700 (PDT) David Miller <[EMAIL PROTECTED]> wrote: > From: Andrew Morton <[EMAIL PROTECTED]> > Date: Tue, 24 Apr 2007 12:42:50 -0700 > > > void debug_mutex_unlock(struct mutex *lock) > > { > > if (unlikely(!debug_locks)) > > return; > > > > --> DEBUG

Re: netlink locking warnings in 2.6.21-rc7-mm1

2007-04-24 Thread David Miller
From: Andrew Morton <[EMAIL PROTECTED]> Date: Tue, 24 Apr 2007 12:42:50 -0700 > void debug_mutex_unlock(struct mutex *lock) > { > if (unlikely(!debug_locks)) > return; > > --> DEBUG_LOCKS_WARN_ON(lock->owner != current_thread_info()); > DEBUG_LOCKS_WARN_ON(lock->magic

netlink locking warnings in 2.6.21-rc7-mm1

2007-04-24 Thread Andrew Morton
http://test.kernel.org/abat/84786/debug/console.log is saying Starting udevd BUG: at kernel/mutex-debug.c:82 debug_mutex_unlock() Call Trace: [] debug_mutex_unlock+0x161/0x170 [] __mutex_unlock_slowpath+0x5c/0x160 [] netlink_dump+0x82/0x1e0 [] netlink_dump_start+0x142/0x180 [] rtnl_dump_ifin