[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF=yD-+0Q86iZMedrBp2wDjVaNvd2_Wy7BcsXLef_e2wJmYm=A@mail.gmail.com>
Date: Sat, 30 Jan 2021 10:04:04 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Sukadev Bhattiprolu <sukadev@...ux.ibm.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
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);
}
Powered by blists - more mailing lists