[PATCH net v3] net: spacemit: Check netif_running() in emac_set_pauseparam()

Andrew Lunn andrew at lunn.ch
Mon Nov 3 07:12:54 PST 2025


On Mon, Nov 03, 2025 at 10:02:49AM +0800, Vivian Wang wrote:
> Currently, emac_set_pauseparam() will oops if userspace calls it while
> the interface is not up, because phydev is NULL, but it is still
> accessed in emac_set_fc() and emac_set_fc_autoneg().
> 
> Check for netif_running(dev) in emac_set_pauseparam() before proceeding.
> 
> Fixes: bfec6d7f2001 ("net: spacemit: Add K1 Ethernet MAC")
> Signed-off-by: Vivian Wang <wangruikang at iscas.ac.cn>

Reviewed-by: Andrew Lunn <andrew at lunn.ch>

    Andrew



More information about the linux-riscv mailing list