kernel_samsung_a53x/drivers/scsi/bnx2fc
Wei Yongjun 078d5ee323 scsi: bnx2fc: Fix skb double free in bnx2fc_rcv()
[ Upstream commit 08c94d80b2da481652fb633e79cbc41e9e326a91 ]

skb_share_check() already drops the reference to the skb when returning
NULL. Using kfree_skb() in the error handling path leads to an skb double
free.

Fix this by removing the variable tmp_skb, and return directly when
skb_share_check() returns NULL.

Fixes: 01a4cc4d0cd6 ("bnx2fc: do not add shared skbs to the fcoe_rx_list")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20221114110626.526643-1-weiyongjun@huaweicloud.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:12:00 +01:00
..
57xx_hsi_bnx2fc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bnx2fc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bnx2fc_constants.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bnx2fc_debug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bnx2fc_debug.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bnx2fc_els.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bnx2fc_fcoe.c scsi: bnx2fc: Fix skb double free in bnx2fc_rcv() 2024-11-18 12:12:00 +01:00
bnx2fc_hwi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bnx2fc_io.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bnx2fc_tgt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00