Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mctp: i2c: fix skb memory leak in receive path

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>
Link: https://patch.msgid.link/20260305143240.97592-1-haiyuewa@163.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Haiyue Wang and committed by
Paolo Abeni
e3f5e0f2 fdfd103a

+1
+1
drivers/net/mctp/mctp-i2c.c
··· 343 343 } else { 344 344 status = NET_RX_DROP; 345 345 spin_unlock_irqrestore(&midev->lock, flags); 346 + kfree_skb(skb); 346 347 } 347 348 348 349 if (status == NET_RX_SUCCESS) {