Re: [PATCH net] net: sysfs: Fix deadlock situation in sysfs accesses

From: Christophe Leroy
Date: Tue Dec 17 2024 - 11:26:18 EST




Le 17/12/2024 à 16:30, Andrew Lunn a écrit :
On Tue, Dec 17, 2024 at 08:18:25AM +0100, Christophe Leroy wrote:
The following problem is encountered on kernel built with
CONFIG_PREEMPT. An snmp daemon running with normal priority is
regularly calling ioctl(SIOCGMIIPHY).

Why is an SNMP daemon using that IOCTL? What MAC driver is this? Is it
using phylib? For phylib, that IOCTL is supposed to be for debug only,
and is a bit of a foot gun. So i would not recommend it.


That's the well-known Net-SNMP package.

See for instance https://github.com/net-snmp/net-snmp/blob/master/agent/mibgroup/if-mib/data_access/interface_linux.c#L954

The MAC is ucc_geth driver, it is phylib for the moment, it is being converted to phylink in net-next , see commit 53036aa8d031 ("net: freescale: ucc_geth: phylink conversion")

Christophe