Commit 75bc3dab authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski
Browse files

net-sysfs: restore behavior for not running devices



modprobe dummy dumdummies=1

Old behavior :

$ cat /sys/class/net/dummy0/carrier
cat: /sys/class/net/dummy0/carrier: Invalid argument

After blamed commit, an empty string is reported.

$ cat /sys/class/net/dummy0/carrier
$

In this commit, I restore the old behavior for carrier,
speed and duplex attributes.

Fixes: 79c61899 ("net-sysfs: remove rtnl_trylock from device attributes")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reported-by: default avatarMarco Leogrande <leogrande@google.com>
Reviewed-by: default avatarAntoine Tenart <atenart@kernel.org>
Link: https://patch.msgid.link/20250221051223.576726-1-edumazet@google.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 98f99288
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment