[Letux-kernel] [PATCH RFC] net: hso: register netdev later to avoid a race condition
andreas at kemnade.info
Mon Apr 24 23:20:29 CEST 2017
On Mon, 24 Apr 2017 22:52:34 +0200
"H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> > Am 24.04.2017 um 22:41 schrieb Andreas Kemnade <andreas at kemnade.info>:
> > Hi,
> > On Mon, 24 Apr 2017 22:36:11 +0200
> > Andreas Kemnade <andreas at kemnade.info> wrote:
> >> If the netdev is accessed before the urbs are initialized,
> >> there will be NULL pointer dereferences
> >> Signed-off-by: Andreas Kemnade <andreas at kemnade.info>
> > this should be a replacement for
> > drivers: net: hso: hack to avoid NULL pointer dereferencing - the reason is unknown. Perhaps some race condition in the USB stack?
> > I cannot reproduce the problem here even without that hack patch. There
> > was some dhcpd running? How was it started?
> I don't exactly remember. I think when starting the modem and during enumeration of the interfaces.
> If I remember correctly it started to occur with 4.11-rc1 or 2. Or maybe even earlier and was never seen again after applying the hack.
from git show 64c8821c4167d1a7a13caaedb419366296c2de30
[ 672.198486] CPU: 0 PID: 2403 Comm: dhcpcd Tainted: G W 4.10.
So it was 4.10. and there was a dhcpcd running. And it was probably
very quick at attaching the device. So it triggered the race condition.
It accesses the device when it is not yet ready.
But my patch should prevent that.
There are no recent changes in hso anyway, so bugs may just randomly
get uncovered or hidden again.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the Letux-kernel