From: Jamie Bainbridge <jamie.bainbridge@gmail.com>
To: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Jamie Bainbridge <jamie.bainbridge@gmail.com>
Subject: [PATCH net 0/4] net-sysfs: check device is present when showing paths
Date: Wed, 24 Jul 2024 11:46:49 +1000 [thread overview]
Message-ID: <cover.1721784184.git.jamie.bainbridge@gmail.com> (raw)
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
next reply other threads:[~2024-07-24 1:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-24 1:46 Jamie Bainbridge [this message]
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
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=cover.1721784184.git.jamie.bainbridge@gmail.com \
--to=jamie.bainbridge@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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).