Thread (1 message) 1 message, 1 author, 2017-07-07

Re: [Patch net] wl1251: add a missing spin_lock_init()

From: Pavel Machek <hidden>
Date: 2017-07-07 16:59:17
Also in: linux-wireless

Hi!
This fixes the following kernel warning:

  [ 5668.771453] BUG: spinlock bad magic on CPU#0, kworker/u2:3/9745
...
  [ 5668.777343] [<c06a4f94>] (ieee80211_subif_start_xmit) from
  [<c0578848>] (dev_hard_start_xmit+0x80/0x118)
  ...

by adding the missing spin_lock_init().

Reported-by: Pavel Machek <redacted>
Cc: Kalle Valo <redacted>
Signed-off-by: Cong Wang <redacted>
Looks very reasonable.

Acked-by: Pavel Machek <redacted>

I tried testing it, and resulting kernel works, but even going back to
broken kernel I can't reproduce the problem on demand...

Best regards,
								Pavel
quoted hunk
+++ b/drivers/net/wireless/ti/wl1251/main.c
@@ -1571,6 +1571,7 @@ struct ieee80211_hw *wl1251_alloc_hw(void)
 
 	wl->state = WL1251_STATE_OFF;
 	mutex_init(&wl->mutex);
+	spin_lock_init(&wl->wl_lock);
 
 	wl->tx_mgmt_frm_rate = DEFAULT_HW_GEN_TX_RATE;
 	wl->tx_mgmt_frm_mod = DEFAULT_HW_GEN_MODULATION_TYPE;
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help