linux-stable/drivers/target
Naohiro Aota f49b20fd01 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:26:31 +01:00
..
iscsi
loopback
sbp
tcm_fc
Kconfig
Makefile
target_core_alua.c
target_core_alua.h
target_core_configfs.c
target_core_device.c scsi: target: core: Add TMF to tmr_list handling 2024-03-01 13:26:25 +01:00
target_core_fabric_configfs.c
target_core_fabric_lib.c
target_core_file.c scsi: target: core: add missing file_{start,end}_write() 2024-01-25 15:27:42 -08:00
target_core_file.h
target_core_hba.c
target_core_iblock.c
target_core_iblock.h
target_core_internal.h
target_core_pr.c
target_core_pr.h
target_core_pscsi.c scsi: target: pscsi: Fix bio_put() for error case 2024-03-01 13:26:31 +01:00
target_core_pscsi.h
target_core_rd.c
target_core_rd.h
target_core_sbc.c
target_core_spc.c
target_core_stat.c
target_core_tmr.c
target_core_tpg.c
target_core_transport.c scsi: target: core: Add TMF to tmr_list handling 2024-03-01 13:26:25 +01:00
target_core_ua.c
target_core_ua.h
target_core_user.c
target_core_xcopy.c
target_core_xcopy.h