4 Apr
2008
4 Apr
'08
10:53 p.m.
* Stephen Hemminger shemminger@vyatta.com 2008-04-04 12:11
The changes in git-net don't look locking related. I suspect either: wireless is calling netlink without holding rtnl_lock; or more likely conditional locking ctrl_dumpfamily is confusing lockdep.
ctrl_dumpfamily only acquires genl_lock if one of the incoming parameters (chains_to_skip) is non-zero. Not sure what the design reason is, Thomas could you add a comment?
First call to ctrl_dumpfamily() is coming directly from the message processing context where genl_lock is already held. Subsequence calls come from netlink_recvmsg() so we have to take the lock separately.
However, I just noticed the condition should really be chains_to_skip != 0 || fams_to_skip != 0