From: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: Network Development <netdev@vger.kernel.org>,
Dany Madden <drt@linux.ibm.com>, Lijun Pan <ljp@linux.ibm.com>,
Rick Lindsley <ricklind@linux.ibm.com>,
abdhalee@in.ibm.com
Subject: Re: [PATCH net 2/2] ibmvnic: fix race with multiple open/close
Date: Mon, 1 Feb 2021 18:21:52 -0800 [thread overview]
Message-ID: <20210202022152.GA615199@us.ibm.com> (raw)
In-Reply-To: <CAF=yD-+0Q86iZMedrBp2wDjVaNvd2_Wy7BcsXLef_e2wJmYm=A@mail.gmail.com>
Willem de Bruijn [willemdebruijn.kernel@gmail.com] wrote:
> On Thu, Jan 28, 2021 at 10:51 PM Sukadev Bhattiprolu
> <sukadev@linux.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@in.ibm.com>
> > Tested-by: Abdul Haleem <abdhalee@in.ibm.com>
> > Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.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
next prev parent reply other threads:[~2021-02-02 2:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-29 3:47 [PATCH net 1/2] ibmvnic: fix a race between open and reset Sukadev Bhattiprolu
2021-01-29 3:47 ` [PATCH net 2/2] ibmvnic: fix race with multiple open/close Sukadev Bhattiprolu
2021-01-30 15:04 ` Willem de Bruijn
2021-02-02 2:21 ` Sukadev Bhattiprolu [this message]
2021-02-01 17:39 ` [PATCH net 1/2] ibmvnic: fix a race between open and reset Dany Madden
2021-02-02 2:38 ` Jakub Kicinski
2021-02-03 5:08 ` Sukadev Bhattiprolu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210202022152.GA615199@us.ibm.com \
--to=sukadev@linux.ibm.com \
--cc=abdhalee@in.ibm.com \
--cc=drt@linux.ibm.com \
--cc=ljp@linux.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=ricklind@linux.ibm.com \
--cc=willemdebruijn.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).