netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/4] net-sysfs: check device is present when showing paths
@ 2024-07-24  1:46 Jamie Bainbridge
  2024-07-24  1:46 ` [PATCH net 1/4] net-sysfs: check device is present when showing carrier Jamie Bainbridge
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Jamie Bainbridge @ 2024-07-24  1:46 UTC (permalink / raw)
  To: netdev, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni
  Cc: Jamie Bainbridge

A sysfs reader can race with a device reset or removal.

This was fixed for speed_show with commit 4224cfd7fb65 ("net-sysfs: add
check for netdevice being present to speed_show") so add the same check
to carrier, duplex, testing, and dormant paths.

Submitting as separate patches to make Fixes reporting accurate.

Signed-off-by: Jamie Bainbridge <jamie.bainbridge@gmail.com>

Jamie Bainbridge (4):
  net-sysfs: check device is present when showing carrier
  net-sysfs: check device is present when showing duplex
  net-sysfs: check device is present when showing testing
  net-sysfs: check device is present when showing dormant

 net/core/net-sysfs.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--
2.39.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-07-25  2:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-24  1:46 [PATCH net 0/4] net-sysfs: check device is present when showing paths Jamie Bainbridge
2024-07-24  1:46 ` [PATCH net 1/4] net-sysfs: check device is present when showing carrier Jamie Bainbridge
2024-07-24  9:35   ` Johannes Berg
2024-07-24  9:41     ` Johannes Berg
2024-07-24 22:54       ` Jamie Bainbridge
2024-07-25  2:22   ` Shigeru Yoshida
2024-07-24  1:46 ` [PATCH net 2/4] net-sysfs: check device is present when showing duplex Jamie Bainbridge
2024-07-24  1:46 ` [PATCH net 3/4] net-sysfs: check device is present when showing testing Jamie Bainbridge
2024-07-24 10:35   ` Andrew Lunn
2024-07-24  1:46 ` [PATCH net 4/4] net-sysfs: check device is present when showing dormant Jamie Bainbridge

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).