linux-stable/drivers/target
Naohiro Aota 4ebc079f0c scsi: target: pscsi: Fix bio_put() for error case
commit de959094eb upstream.

As of commit 066ff57101 ("block: turn bio_kmalloc into a simple kmalloc
wrapper"), a bio allocated by bio_kmalloc() must be freed by bio_uninit()
and kfree(). That is not done properly for the error case, hitting WARN and
NULL pointer dereference in bio_free().

Fixes: 066ff57101 ("block: turn bio_kmalloc into a simple kmalloc wrapper")
CC: stable@vger.kernel.org # 6.1+
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Link: https://lore.kernel.org/r/20240214144356.101814-1-naohiro.aota@wdc.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-01 13:34:59 +01:00
..
iscsi Merge patch series "scsi: target: iscsi: Get rid of sprintf in iscsi_target_configfs.c" 2023-07-31 12:11:17 -04:00
loopback scsi: target: tcm_loop: Remove redundant driver match function 2023-03-24 20:44:14 -04:00
sbp scsi: target: sbp: Remove default fabric ops callouts 2023-03-16 23:36:36 -04:00
tcm_fc scsi: target: fcoe: Remove default fabric ops callouts 2023-03-16 23:36:36 -04:00
tcm_remote scsi: target: Add virtual remote target 2023-03-16 23:36:37 -04:00
Kconfig scsi: target: Add virtual remote target 2023-03-16 23:36:37 -04:00
Makefile scsi: target: Add virtual remote target 2023-03-16 23:36:37 -04:00
target_core_alua.c
target_core_alua.h
target_core_configfs.c scsi: target: Replace strlcpy() with strscpy() 2023-09-05 05:55:20 -04:00
target_core_device.c scsi: target: core: Add TMF to tmr_list handling 2024-03-01 13:34:48 +01:00
target_core_fabric_configfs.c scsi: target: core: Fix invalid memory access 2023-04-11 20:49:43 -04:00
target_core_fabric_lib.c
target_core_file.c scsi: target: core: add missing file_{start,end}_write() 2024-01-25 15:35:45 -08:00
target_core_file.h
target_core_hba.c
target_core_iblock.c SCSI misc on 20230902 2023-09-02 12:02:41 -07:00
target_core_iblock.h
target_core_internal.h Merge patch series "target: TMF and recovery fixes" 2023-03-24 17:39:15 -04:00
target_core_pr.c Merge patch series "Use block pr_ops in LIO" 2023-05-22 16:35:02 -04:00
target_core_pr.h
target_core_pscsi.c scsi: target: pscsi: Fix bio_put() for error case 2024-03-01 13:34:59 +01:00
target_core_pscsi.h
target_core_rd.c scsi: target: Rename sbc_ops to exec_cmd_ops 2023-04-11 21:55:36 -04:00
target_core_rd.h
target_core_sbc.c scsi: target: Rename sbc_ops to exec_cmd_ops 2023-04-11 21:55:36 -04:00
target_core_spc.c Merge patch series "Use block pr_ops in LIO" 2023-05-22 16:35:02 -04:00
target_core_stat.c
target_core_tmr.c scsi: target: Fix multiple LUN_RESET handling 2023-03-24 17:32:23 -04:00
target_core_tpg.c Merge patch series "target: TMF and recovery fixes" 2023-03-24 17:39:15 -04:00
target_core_transport.c scsi: target: core: Add TMF to tmr_list handling 2024-03-01 13:34:48 +01:00
target_core_ua.c
target_core_ua.h
target_core_user.c scsi: target: tcmu: Replace strlcpy() with strscpy() 2023-06-21 21:13:00 -04:00
target_core_xcopy.c scsi: target: Pass in cmd counter to use during cmd setup 2023-03-24 17:32:23 -04:00
target_core_xcopy.h