All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
	Kalle Valo <kvalo@codeaurora.org>
Subject: Re: [Patch net] wl1251: add a missing spin_lock_init()
Date: Fri, 7 Jul 2017 18:59:17 +0200	[thread overview]
Message-ID: <20170707165917.GA14179@amd> (raw)
In-Reply-To: <1499378437-4971-1-git-send-email-xiyou.wangcong@gmail.com>

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

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 <pavel@ucw.cz>
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>

Looks very reasonable.

Acked-by: Pavel Machek <pavel@ucw.cz>

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

> +++ 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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>
To: Cong Wang <xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Kalle Valo <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Subject: Re: [Patch net] wl1251: add a missing spin_lock_init()
Date: Fri, 7 Jul 2017 18:59:17 +0200	[thread overview]
Message-ID: <20170707165917.GA14179@amd> (raw)
In-Reply-To: <1499378437-4971-1-git-send-email-xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

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

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 <pavel-+ZI9xUNit7I@public.gmane.org>
> Cc: Kalle Valo <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
> Signed-off-by: Cong Wang <xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Looks very reasonable.

Acked-by: Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>

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

> +++ 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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2017-07-07 16:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-06 22:00 [Patch net] wl1251: add a missing spin_lock_init() Cong Wang
2017-07-07 16:59 ` Pavel Machek [this message]
2017-07-07 16:59   ` Pavel Machek
2017-07-21  7:54 ` Pavel Machek
2017-07-21  8:00   ` Kalle Valo
2017-07-27 10:59 ` [net] " Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170707165917.GA14179@amd \
    --to=pavel@ucw.cz \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.