[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160307.155837.483651456794896295.davem@davemloft.net>
Date: Mon, 07 Mar 2016 15:58:37 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: bjorn@...k.no
Cc: andreyknvl@...il.com, torvalds@...ux-foundation.org,
oneukum@...e.com, dvyukov@...gle.com, glider@...gle.com,
kcc@...gle.com, gregkh@...uxfoundation.org,
linux-usb@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] cdc_ncm: do not call usbnet_link_change from
cdc_ncm_bind
From: Bjørn Mork <bjorn@...k.no>
Date: Mon, 7 Mar 2016 21:15:36 +0100
> usbnet_link_change will call schedule_work and should be
> avoided if bind is failing. Otherwise we will end up with
> scheduled work referring to a netdev which has gone away.
>
> Instead of making the call conditional, we can just defer
> it to usbnet_probe, using the driver_info flag made for
> this purpose.
>
> Fixes: 8a34b0ae8778 ("usbnet: cdc_ncm: apply usbnet_link_change")
> Reported-by: Andrey Konovalov <andreyknvl@...il.com>
> Suggested-by: Linus Torvalds <torvalds@...ux-foundation.org>
> Signed-off-by: Bjørn Mork <bjorn@...k.no>
...
> Even with Oliver's generic fix we should still fix the inconsistency
> in cdc_ncm, as pointed out by Linus.
>
> This is a slightly different approach than the patch proposed by Linus.
> When I started looking at this I couldn't figure out why we were doing
> this differently in this driver from all the other usbnet drivers
> disabling the link at probe time. So let's make it consistent. Then at
> least we get consistent bugs :)
Fair enough, applied and queued up for -stable.
Thanks.
Powered by blists - more mailing lists