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]
Date:   Mon, 1 Feb 2021 18:21:52 -0800
From:   Sukadev Bhattiprolu <sukadev@...ux.ibm.com>
To:     Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc:     Network Development <netdev@...r.kernel.org>,
        Dany Madden <drt@...ux.ibm.com>, Lijun Pan <ljp@...ux.ibm.com>,
        Rick Lindsley <ricklind@...ux.ibm.com>, abdhalee@...ibm.com
Subject: Re: [PATCH net 2/2] ibmvnic: fix race with multiple open/close

Willem de Bruijn [willemdebruijn.kernel@...il.com] wrote:
> On Thu, Jan 28, 2021 at 10:51 PM Sukadev Bhattiprolu
> <sukadev@...ux.ibm.com> wrote:
> >
> > If two or more instances of 'ip link set' commands race and first one
> > already brings the interface up (or down), the subsequent instances
> > can simply return without redoing the up/down operation.
> >
> > Fixes: ed651a10875f ("ibmvnic: Updated reset handling")
> > Reported-by: Abdul Haleem <abdhalee@...ibm.com>
> > Tested-by: Abdul Haleem <abdhalee@...ibm.com>
> > Signed-off-by: Sukadev Bhattiprolu <sukadev@...ux.ibm.com>
> 
> Isn't this handled in the rtnetlink core based on IFF_UP?
> 
>         if ((old_flags ^ flags) & IFF_UP) {
>                 if (old_flags & IFF_UP)
>                         __dev_close(dev);
>                 else
>                         ret = __dev_open(dev, extack);
>         }

Good question. During our testing we hit the "adapter already open" debug
message a few times. Without this change, the core layer and dirver disagree
on the state and the adapter becomes unsuable.

I will debug this at the core layer also later this week.  

We are working on rewriting parts of driver surrounding locking/adapter
state and not sure if that will reveal any other cause for this behavior.

Sukadev

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ