[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170809.142437.1296296363845982866.davem@davemloft.net>
Date: Wed, 09 Aug 2017 14:24:37 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: jacob.e.keller@...el.com
Cc: netdev@...r.kernel.org
Subject: Re: [RFC PATCH] net: don't set __LINK_STATE_START until after
dev->open() call
From: "Keller, Jacob E" <jacob.e.keller@...el.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 :-)
Powered by blists - more mailing lists