netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Heiner Kallweit <hkallweit1@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>, David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH net-next 1/2] net: linkwatch: add check for netdevice being present to linkwatch_do_dev
Date: Wed, 19 Sep 2018 17:03:02 -0700	[thread overview]
Message-ID: <6e4ae96c-f879-d545-6e66-0fc9b01ac56d@gmail.com> (raw)
In-Reply-To: <11beeaa9-57d5-e641-9486-f2ba202d0998@gmail.com>

On 09/18/2018 12:55 PM, Heiner Kallweit wrote:
> When bringing down the netdevice (incl. detaching it) and calling
> netif_carrier_off directly or indirectly the latter triggers an
> asynchronous linkwatch event.
> This linkwatch event eventually may fail to access chip registers in
> the ndo_get_stats/ndo_get_stats64 callback because the device isn't
> accessible any longer, see call trace in [0].
> 
> To prevent this scenario don't check for IFF_UP only, but also make
> sure that the netdevice is present.
> 
> [0] https://lists.openwall.net/netdev/2018/03/15/62
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Thanks Heiner!
-- 
Florian

  parent reply	other threads:[~2018-09-20  5:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18 19:54 [PATCH net-next 0/2] net: phy: make phy_stop() synchronous Heiner Kallweit
2018-09-18 19:55 ` [PATCH net-next 1/2] net: linkwatch: add check for netdevice being present to linkwatch_do_dev Heiner Kallweit
2018-09-19  8:48   ` Geert Uytterhoeven
2018-09-20  0:03   ` Florian Fainelli [this message]
2018-09-18 19:56 ` [PATCH net-next 2/2] net: phy: call state machine synchronously in phy_stop Heiner Kallweit
2018-09-19  8:49   ` Geert Uytterhoeven
2018-09-20  0:03   ` Florian Fainelli
2018-09-20  4:07 ` [PATCH net-next 0/2] net: phy: make phy_stop() synchronous David Miller

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=6e4ae96c-f879-d545-6e66-0fc9b01ac56d@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=geert+renesas@glider.be \
    --cc=hkallweit1@gmail.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).