[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 11 Nov 2013 08:44:23 +0100
From: Oliver Neukum <oneukum@...e.de>
To: wangbiao <biao.wang@...el.com>
Cc: netdev@...r.kernel.org, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
mingo@...e.hu, a.p.zijlstra@...llo.nl, rusty@...tcorp.com.au,
william.douglas@...el.com
Subject: Re: [PATCH] usbnet: fix race condition caused spinlock bad magic
issue
On Mon, 2013-11-11 at 11:08 +0800, wangbiao wrote:
> From: wang, biao <biao.wang@...el.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, when
> unlink_wakeup used in usbnet_bh, it may be already freed and used by
> other function as unlink_wakeup was a local var on stack.
Hi,
the debugging is good, but the fix is not good.
If you use a global variable, you can init the head
only once, that is on module load, not during probe()
Doing so can mess up operations with multiple modules
as a hotplug happens.
Regards
Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists