* [PATCH] litex_liteeth: Fix a double free in the remove function
@ 2021-11-07 20:13 Christophe JAILLET
2021-11-07 22:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2021-11-07 20:13 UTC (permalink / raw)
To: davem, kuba, gsomlo, joel, caihuoqing
Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET
'netdev' is a managed resource allocated in the probe using
'devm_alloc_etherdev()'.
It must not be freed explicitly in the remove function.
Fixes: ee7da21ac4c3 ("net: Add driver for LiteX's LiteETH network interface")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/net/ethernet/litex/litex_liteeth.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/litex/litex_liteeth.c b/drivers/net/ethernet/litex/litex_liteeth.c
index 3d9385a4989b..24ed6e180c75 100644
--- a/drivers/net/ethernet/litex/litex_liteeth.c
+++ b/drivers/net/ethernet/litex/litex_liteeth.c
@@ -289,7 +289,6 @@ static int liteeth_remove(struct platform_device *pdev)
struct net_device *netdev = platform_get_drvdata(pdev);
unregister_netdev(netdev);
- free_netdev(netdev);
return 0;
}
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] litex_liteeth: Fix a double free in the remove function
2021-11-07 20:13 [PATCH] litex_liteeth: Fix a double free in the remove function Christophe JAILLET
@ 2021-11-07 22:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-07 22:00 UTC (permalink / raw)
To: Christophe JAILLET
Cc: davem, kuba, gsomlo, joel, caihuoqing, netdev, linux-kernel,
kernel-janitors
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Sun, 7 Nov 2021 21:13:07 +0100 you wrote:
> 'netdev' is a managed resource allocated in the probe using
> 'devm_alloc_etherdev()'.
> It must not be freed explicitly in the remove function.
>
> Fixes: ee7da21ac4c3 ("net: Add driver for LiteX's LiteETH network interface")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>
> [...]
Here is the summary with links:
- litex_liteeth: Fix a double free in the remove function
https://git.kernel.org/netdev/net/c/c45231a7668d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-07 22:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-07 20:13 [PATCH] litex_liteeth: Fix a double free in the remove function Christophe JAILLET
2021-11-07 22:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).