From: David Miller <davem@davemloft.net>
To: jacob.e.keller@intel.com
Cc: netdev@vger.kernel.org
Subject: Re: [RFC PATCH] net: don't set __LINK_STATE_START until after dev->open() call
Date: Wed, 09 Aug 2017 14:24:37 -0700 (PDT) [thread overview]
Message-ID: <20170809.142437.1296296363845982866.davem@davemloft.net> (raw)
In-Reply-To: <02874ECE860811409154E81DA85FBB5882A3F62D@ORSMSX115.amr.corp.intel.com>
From: "Keller, Jacob E" <jacob.e.keller@intel.com>
Date: Wed, 9 Aug 2017 20:00:55 +0000
> That's what I am worried about. However, I think there are problems
> with leaving it. A lot of drivers rely on netif_running() to
> determine whether or not the device is open, but they may be using
> it relying on all the changes caused by the .ndo_open() handler are
> finished. The current system there is a race, since you set the
> __LINK_STATE_START before .ndo_open is called.
I think this is only a half-accurate description.
What drivers want to know is if initialization phase X of ndo_open()
has completed.
And honestly it must be like this because this is what one would
use to guide the teardown during failure paths of ndo_open(), right?
So I would really rather drivers internally track this "I initialized
X" state, as most drivers do, rather than take the risk of changing
the netif_running() behavior which can impact ~500 drivers :-)
prev parent reply other threads:[~2017-08-09 21:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-07 22:24 [RFC PATCH] net: don't set __LINK_STATE_START until after dev->open() call Jacob Keller
2017-08-09 1:16 ` David Miller
2017-08-09 20:00 ` Keller, Jacob E
2017-08-09 21:24 ` David Miller [this message]
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=20170809.142437.1296296363845982866.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jacob.e.keller@intel.com \
--cc=netdev@vger.kernel.org \
/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).