lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231204113119.11247-1-jtornosm@redhat.com>
Date:   Mon,  4 Dec 2023 12:31:18 +0100
From:   Jose Ignacio Tornos Martinez <jtornosm@...hat.com>
To:     oneukum@...e.com
Cc:     davem@...emloft.net, edumazet@...gle.com, greg@...ah.com,
        jtornosm@...hat.com, kuba@...nel.org, linux-kernel@...r.kernel.org,
        linux-usb@...r.kernel.org, netdev@...r.kernel.org,
        pabeni@...hat.com, stable@...r.kernel.org,
        stern@...land.harvard.edu
Subject: Re: [PATCH v3] net: usb: ax88179_178a: avoid failed operations when device is disconnected

Hi Oliver,

> this is much better.
>> ...
> This is problematic. ndo_stop() is not limited to disconnection.
> It is also used whenever an interface transitions from up to down.
>> ...
>
> On a general note, you are going for a belt and suspenders approach.
> It seems to me that you have two options.
> 1. Do as Alan suggested and ignore ENODEV. You'd be acknowledging that
> these devices are hotpluggable and therefore -ENODEV is not an error
> 2. Use only a flag. But if you do that, you are setting it in the wrong
> place. It should be set in usbnet_disconnect()
Thank you for you help, I will do what you say.
I would like to try 2 first so that it only affects the unbind operation.
If I find any problem, I will try 1.

> O and, well, this is a very mior issue, but you've introduced a memory
> ordering issue. You ought to use smp_wmb() after setting the flag and
> smp_rmb() before reading it.
Thank you again, I'll keep that in mind

Best regards
José Ignacio

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ