linux/drivers/scsi/bnx2fc
Wei Yongjun 08c94d80b2 scsi: bnx2fc: Fix skb double free in bnx2fc_rcv()
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: 01a4cc4d0c ("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>
History 2023-12-18 20:29:53 -05:00
..
57xx_hsi_bnx2fc.h scsi: Fix various misspellings of "connect" 2019-10-24 21:22:32 -04:00
bnx2fc.h scsi: bnx2fc: Do not rely on a SCSI command for LUN or target reset 2023-10-13 14:23:14 -04:00
bnx2fc_constants.h scsi: bnx2fc: Update copyright for 2017. 2017-06-27 21:39:09 -04:00
bnx2fc_debug.c scsi: bnx2fc: Update copyright for 2017. 2017-06-27 21:39:09 -04:00
bnx2fc_debug.h scsi: bnx2fc: Update copyright for 2017. 2017-06-27 21:39:09 -04:00
bnx2fc_els.c scsi: bnx2fc: fix bnx2fc_cmd refcount imbalance in send_srr 2019-06-26 22:43:02 -04:00
bnx2fc_fcoe.c scsi: bnx2fc: Fix skb double free in bnx2fc_rcv() 2023-12-18 20:29:53 -05:00
bnx2fc_hwi.c scsi: bnx2fc: Do not rely on a SCSI command for LUN or target reset 2023-10-13 14:23:14 -04:00
bnx2fc_io.c scsi: bnx2fc: Do not rely on a SCSI command for LUN or target reset 2023-10-13 14:23:14 -04:00
bnx2fc_tgt.c scsi: bnx2fc: Fix typo in comments 2022-01-31 16:49:31 -05:00
Kconfig scsi: bnx2fc: Fix Kconfig warning & CNIC build errors 2021-02-22 22:26:39 -05:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00