From: Ben Greear Date: Fri, 15 Oct 2010 22:04:09 +0000 (-0700) Subject: ath9k: Properly initialize ath_common->cc_lock. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=20b25744d1366762c6878d3254f93973cafe1f8e;p=openwrt%2Fstaging%2Fblogic.git ath9k: Properly initialize ath_common->cc_lock. Otherwise, lockdep splats, at the least: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. Pid: 2240, comm: ip Not tainted 2.6.36-rc8-wl+ #32 Call Trace: [] ? printk+0xf/0x17 [] register_lock_class+0x5a/0x29e [] ? mark_lock+0x1e/0x1de [] __lock_acquire+0xa2/0xb8c [] ? mark_lock+0x1e/0x1de [] lock_acquire+0x5a/0x78 [] ? ath9k_config+0x274/0x3d8 [ath9k] [] _raw_spin_lock_irqsave+0x2f/0x3f [] ? ath9k_config+0x274/0x3d8 [ath9k] [] ath9k_config+0x274/0x3d8 [ath9k] [] ieee80211_hw_config+0x11b/0x125 [mac80211] [] ieee80211_do_open+0x3c5/0x466 [mac80211] [] ? ieee80211_check_concurrent_iface+0x21/0x13a [mac80211] [] ieee80211_open+0x5b/0x5e [mac80211] [] __dev_open+0x80/0xae [] __dev_change_flags+0xa0/0x115 [] dev_change_flags+0x13/0x3f [] do_setlink+0x23a/0x51b [] ? register_lock_class+0x17/0x29e [] rtnl_newlink+0x269/0x431 [] ? rtnl_newlink+0x7e/0x431 [] ? mark_lock+0x1e/0x1de [] ? mark_held_locks+0x47/0x5f [] ? __mutex_lock_common+0x2bb/0x2d6 [] ? trace_hardirqs_on_caller+0x104/0x125 [] ? __mutex_lock_common+0x2cc/0x2d6 [] ? rtnl_newlink+0x0/0x431 [] rtnetlink_rcv_msg+0x182/0x198 [] ? rtnetlink_rcv_msg+0x0/0x198 [] netlink_rcv_skb+0x30/0x77 [] rtnetlink_rcv+0x1b/0x22 [] netlink_unicast+0xbe/0x119 [] netlink_sendmsg+0x234/0x24c [] __sock_sendmsg+0x51/0x5a [] sock_sendmsg+0x93/0xa7 [] ? might_fault+0x47/0x81 [] ? might_fault+0x7c/0x81 [] ? copy_from_user+0x8/0xa [] ? verify_iovec+0x3e/0x6d [] sys_sendmsg+0x149/0x193 [] ? register_lock_class+0x17/0x29e [] ? mark_lock+0x1e/0x1de [] ? __do_fault+0x1fc/0x3a5 [] ? unlock_page+0x40/0x43 [] ? __do_fault+0x379/0x3a5 [] ? lock_release_non_nested+0x86/0x1d8 [] ? might_fault+0x47/0x81 [] ? might_fault+0x47/0x81 [] sys_socketcall+0x15e/0x1a5 [] sysenter_do_call+0x12/0x38 Signed-off-by: Ben Greear Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index bc6c4df9712c..95b41db0d86b 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -577,6 +577,7 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid, common->hw = sc->hw; common->priv = sc; common->debug_mask = ath9k_debug; + spin_lock_init(&common->cc_lock); spin_lock_init(&sc->wiphy_lock); spin_lock_init(&sc->sc_resetlock);