[Letux-kernel] [PATCH RFC] net: hso: register netdev later to avoid a race condition

H. Nikolaus Schaller hns at goldelico.com
Thu Apr 27 07:43:38 CEST 2017


Hi Andreas,

> Am 26.04.2017 um 19:22 schrieb Andreas Kemnade <andreas at kemnade.info>:
> 
> Hi,
> 
> On Wed, 26 Apr 2017 18:15:10 +0200
> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> 
>> Hi,
>> 
>>> Am 26.04.2017 um 18:03 schrieb Andreas Kemnade <andreas at kemnade.info>:
>>> 
>>> On Wed, 26 Apr 2017 08:53:18 +0200
>>> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
>>> 
>>> 
>>>>> But nevertheless I managed to reproduce the kernel oops.
>>>> 
>>>> Ok, that is the most important thing for kernel debugging.
>>>> 
>>> Hmm, I checked again.
>>> - reproducible with 4.10 without your hack and without "net: hso:
>>> register netdev later to avoid a race condition"
>>> - reproducible with 4.11rc8 without you hack and without "net: hso:
>>> register netdev later to avoid a race condition"
>>> - not reproducible with 4.11rc8 without your hack but with "net: hso:
>>> register netdev later to avoid a race condition"
>> 
>>> 
>>> hmm, am I not patient enough to have it crash? Or have you mixed up
>>> this patch with my earlier patch about the rmmod problem?
>> 
>> Ah! You are right. Looks as if I mixed it up with the rmmod problem which
>> I had not seen before... I think I am getting old...
>> 
> The rmmod problem fix seems to go into 4.11 if I understand the
> branching system correctly.
> 
>> So I never tried the patch that you did include in your first mail on this
>> thread. Looks as if there were too many other patches queued up before I found
>> time to look into them and then e-mail isn't the best "todo" archive.
>> 
>> Maybe a better strategy would be to pile them all up in some work/kemnade/hso
>> feature branch. Then none gets lost. This is a little different from LKML
>> patches where there is patchwork.kernel.org to collect all patches and track them.
>> 
> If it is not going upstream in a fast way, I will add such a branch.
> This time I send a patch rfc explicitly because I could not reproduce
> the problem.
> 
>>> Just asking to avoid debugging a possibly non-existent problem.
>> 
>> I will try it asap and report if it is equally good as my mdelay hack...
>> 
> I will send the patch upstream. You can then add a tested-by. If
> that patch does not fix things, I am out of ideas anyways, so we have
> to ask upstream anyways. Then there are chances that it will be accepted
> before the next merge window opens.

Seems indeed to fix the problem!

root at letux:~# ./wwan-status
[ 1576.772766] wwan_on_off_rfkill_set_block: blocked: 0
[ 1576.779205] modem: set_power 1
[ 1576.782501] USB phy event 0
[ 1576.789794]   state 0
[ 1576.798034] modem: send impulse
[ 1577.535675] USB phy event 0
[ 1577.538726] modem: done
[ 1580.175842] usb 1-2: new high-speed USB device number 2 using ehci-omap
[ 1580.384155] usb 1-2: New USB device found, idVendor=0af0, idProduct=8800
[ 1580.392059] usb 1-2: New USB device strings: Mfr=3, Product=2, SerialNumber=0
[ 1580.402862] usb 1-2: Product: Globetrotter HSUPA Modem
[ 1580.410461] usb 1-2: Manufacturer: Option N.V.
[ 1580.750061] hso: drivers/net/usb/hso.c: Option Wireless
[ 1580.915649] usbcore: registered new interface driver hso
AT$QCVOLT

3926

OK
AT$QCSIMSTAT?

$QCSIMSTAT: 0,UNKNOWN

OK
^Croot at letux:~#

BR,
Nikolaus



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20170427/0bd31555/attachment.asc>


More information about the Letux-kernel mailing list