From: Oliver Neukum <oliver@neukum.org>
To: wangbiao <biao.wang@intel.com>
Cc: netdev@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org,
Ingo Molnar <mingo.kernel.org@gmail.com>,
akpm@linux-foundation.org, mingo@elte.hu, a.p.zijlstra@chello.nl,
rusty@rustcorp.com.au, william.douglas@intel.com,
di.zhang@intel.com
Subject: Re: [PATCH V3] usbnet: fix race condition caused spinlock bad magic issue
Date: Thu, 14 Nov 2013 08:44:42 +0100 [thread overview]
Message-ID: <1384415082.18291.8.camel@linux-fkkt.site> (raw)
In-Reply-To: <1384394595.4229.24.camel@wangbiao>
On Thu, 2013-11-14 at 10:03 +0800, wangbiao wrote:
> From: wang, biao <biao.wang@intel.com>
> Date: Mon, 11 Nov 2013 10:23:40 +0800
> Subject: [PATCH] usbnet: fix race condition caused spinlock bad magic issue
>
> there is race between usbnet_terminate_urbs and usbnet_bh.
> for example:
> cpu 0 cpu 1
> usbnet_suspend
> usbnet_bh { ->usbnet_terminate_urbs {
> dev->wait = &unlink_wakeup;
> while(....){..}//break
> if(dev->wait) is true
> dev->wait=NULL
> }//unlink_wakeup is invalid
> __wake_up(dev->wait)//garbage value
> }
>
> the race is due to unprotection of dev->wait, so this patch involves a
> spinlock to avoid it.
>
> Signed-off-by: wang, biao <biao.wang@intel.com>
> Signed-off-by: Zhang, Di <di.zhang@intel.com>
Acked-by: Oliver Neukum <oliver@neukum.org>
next prev parent reply other threads:[~2013-11-14 8:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 2:03 wangbiao
2013-11-14 7:44 ` Oliver Neukum [this message]
2013-11-14 9:18 ` Bjørn Mork
2013-11-14 7:58 ` Ingo Molnar
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=1384415082.18291.8.camel@linux-fkkt.site \
--to=oliver@neukum.org \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=biao.wang@intel.com \
--cc=di.zhang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mingo.kernel.org@gmail.com \
--cc=mingo@elte.hu \
--cc=netdev@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=william.douglas@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®