net: stmmac: Fix missing spin_lock_init in visconti_eth_dwmac_probe()
Subsystems (5)
PATCH 1/1 net: stmmac: Fix missing spin_lock_init in visconti_eth_dwmac_probe()
The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly.
--- drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c +1 -0
@@ -218,6 +218,7 @@ static int visconti_eth_dwmac_probe(struct platform_device *pdev) goto remove_config; } +spin_lock_init (&dwmac->lock); dwmac->reg = stmmac_res.addr; plat_dat->bsp_priv = dwmac; plat_dat->fix_mac_speed = visconti_eth_fix_mac_speed;
Hi,
Quoted 6 lines · Wei Yongjun
The driver allocates the spinlock but not initialize it. Use
spin_lock_init()on it to initialize it correctly.Fixes b38dd98ff8d0 ("net: stmmac: Add Toshiba Visconti SoCs glue driver")Reported-by Hulk Robot <[email protected]>Signed-off-by Wei Yongjun <[email protected]>
Thanks for your fix.
Quoted 11 lines
--- drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c +0
-0
drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c static int visconti_eth_dwmac_probe(struct platform_device *pdev) · line 224
Quoted 7 lines
drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c +1
-0@@ -218,6 +218,7 @@ static int visconti_eth_dwmac_probe(struct platform_device *pdev) goto remove_config; } +spin_lock_init (&dwmac->lock); dwmac->reg = stmmac_res.addr; plat_dat->bsp_priv = dwmac; plat_dat->fix_mac_speed = visconti_eth_fix_mac_speed;
Best regards,
Nobuhiro
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
This patch was applied to netdev/net.git (refs/heads/master):
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
Quoted 8 lines · On Tue, 23 Feb 2021 10:48:03 +0000 you wrote:
The driver allocates the spinlock but not initialize it. Use
spin_lock_init()on it to initialize it correctly.Fixes b38dd98ff8d0 ("net: stmmac: Add Toshiba Visconti SoCs glue driver")Reported-by Hulk Robot <[email protected]>Signed-off-by Wei Yongjun <[email protected]>[...]
Here is the summary with links:
- net: stmmac: Fix missing spin_lock_init in visconti_eth_dwmac_probe()
https://git.kernel.org/netdev/net/c/17d7fd47aa90
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html