* [PATCH net v1] mctp: i2c: fix skb memory leak in receive path
@ 2026-03-05 14:32 Haiyue Wang
2026-03-10 10:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Haiyue Wang @ 2026-03-05 14:32 UTC (permalink / raw)
To: netdev
Cc: Haiyue Wang, Jeremy Kerr, Matt Johnston, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Wolfram Sang, open list
When 'midev->allow_rx' is false, the newly allocated skb isn't consumed
by netif_rx(), it needs to free the skb directly.
Fixes: f5b8abf9fc3d ("mctp i2c: MCTP I2C binding driver")
Signed-off-by: Haiyue Wang <haiyuewa@163.com>
---
drivers/net/mctp/mctp-i2c.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/mctp/mctp-i2c.c b/drivers/net/mctp/mctp-i2c.c
index de6bc1736734..15fe4d1163c1 100644
--- a/drivers/net/mctp/mctp-i2c.c
+++ b/drivers/net/mctp/mctp-i2c.c
@@ -343,6 +343,7 @@ static int mctp_i2c_recv(struct mctp_i2c_dev *midev)
} else {
status = NET_RX_DROP;
spin_unlock_irqrestore(&midev->lock, flags);
+ kfree_skb(skb);
}
if (status == NET_RX_SUCCESS) {
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net v1] mctp: i2c: fix skb memory leak in receive path
2026-03-05 14:32 [PATCH net v1] mctp: i2c: fix skb memory leak in receive path Haiyue Wang
@ 2026-03-10 10:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-10 10:20 UTC (permalink / raw)
To: Haiyue Wang
Cc: netdev, jk, matt, andrew+netdev, davem, edumazet, kuba, pabeni,
wsa, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Thu, 5 Mar 2026 22:32:34 +0800 you wrote:
> When 'midev->allow_rx' is false, the newly allocated skb isn't consumed
> by netif_rx(), it needs to free the skb directly.
>
> Fixes: f5b8abf9fc3d ("mctp i2c: MCTP I2C binding driver")
> Signed-off-by: Haiyue Wang <haiyuewa@163.com>
> ---
> drivers/net/mctp/mctp-i2c.c | 1 +
> 1 file changed, 1 insertion(+)
Here is the summary with links:
- [net,v1] mctp: i2c: fix skb memory leak in receive path
https://git.kernel.org/netdev/net/c/e3f5e0f22cfc
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:[~2026-03-10 10:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05 14:32 [PATCH net v1] mctp: i2c: fix skb memory leak in receive path Haiyue Wang
2026-03-10 10:20 ` 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