[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200924090311.745cac3b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Thu, 24 Sep 2020 09:03:11 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Saeed Mahameed <saeed@...nel.org>
Cc: David Miller <davem@...emloft.net>, hkallweit1@...il.com,
geert+renesas@...der.be, f.fainelli@...il.com, andrew@...n.ch,
gaku.inami.xh@...esas.com, yoshihiro.shimoda.uh@...esas.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Revert "net: linkwatch: add check for netdevice being
present to linkwatch_do_dev"
On Wed, 23 Sep 2020 22:49:37 -0700 Saeed Mahameed wrote:
> 2) Another problematic scenario which i see is repeated in many
> drivers:
>
> shutdown/suspend()
> rtnl_lock()
> netif_device_detach()//Mark !present;
> stop()->carrier_off()->linkwatch_event()
> // at this point device is still IFF_UP and !present
> // due to the early detach above..
> rtnl_unlock();
Maybe we can solve this by providing drivers with a better helper for
the suspend use case?
AFAIU netif_device_detach() is used by both IO errors and drivers
willingly detaching the device during normal operation (e.g. for
suspend).
Since the suspend path can sleep if we have a separate helper perhaps
we could fire off the appropriate events synchronously, and quiescence
the stack properly?
Powered by blists - more mailing lists