]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net-sysfs: restore behavior for not running devices
authorEric Dumazet <edumazet@google.com>
Fri, 21 Feb 2025 05:12:23 +0000 (05:12 +0000)
committerJakub Kicinski <kuba@kernel.org>
Mon, 24 Feb 2025 22:21:23 +0000 (14:21 -0800)
commit75bc3dab4e49b4daccb27ad6ce8ce2fcd253fc1b
treec66af71d41b6f7672008d1e50a3450af39c3f22e
parent98f9928843331fc4e91b25d9969a9458c3f9c552
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: 79c61899b5ee ("net-sysfs: remove rtnl_trylock from device attributes")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Marco Leogrande <leogrande@google.com>
Reviewed-by: Antoine Tenart <atenart@kernel.org>
Link: https://patch.msgid.link/20250221051223.576726-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/net-sysfs.c