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 scsi: target: iscsi: Fix buffer overflow in lio_target_nacl_info_show() 2023-09-23 11:11:07 +02:00
loopback scsi: target: tcm_loop: Fix possible name leak in tcm_loop_setup_hba_bus() 2022-11-17 17:46:16 +00:00
sbp scsi: target: sbp: Replace enable attr with ops.enable 2021-10-04 23:27:38 -04:00
tcm_fc scsi: target: tcm_fc: Fix a kernel-doc header 2021-04-15 22:44:41 -04:00
Kconfig scsi: core: Rename CONFIG_BLK_SCSI_REQUEST to CONFIG_SCSI_COMMON 2021-07-28 22:24:27 -04:00
Makefile
target_core_alua.c scsi: target: alua: Do not report emtpy port group 2022-09-15 21:42:44 -04:00
target_core_alua.h
target_core_configfs.c scsi: target: Detect UNMAP support post configuration 2022-07-07 16:53:53 -04:00
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 scsi: target: configfs: Delete unnecessary checks for NULL 2021-11-18 23:07:02 -05:00
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 scsi: target: iblock: Fold iblock_emulate_read_cap_with_block_size() into iblock_get_blocks() 2022-10-01 05:51:47 -04:00
target_core_iblock.h
target_core_internal.h scsi: target: Move cmd counter allocation 2023-05-11 23:03:19 +09:00
target_core_pr.c scsi: target: core: New key must be used for moved PR 2022-10-01 05:03:57 -04:00
target_core_pr.h scsi: target: core: Unify NAA identifier generation 2021-05-15 14:14:28 -04:00
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 scsi: target: pscsi: Remove struct pscsi_plugin_task 2022-03-01 22:21:49 -05:00
target_core_rd.c scsi: target: Add the DUMMY flag to rd_mcp 2021-04-05 23:26:38 -04:00
target_core_rd.h scsi: target: Add the DUMMY flag to rd_mcp 2021-04-05 23:26:38 -04:00
target_core_sbc.c SCSI misc on 20220804 2022-08-04 19:47:37 -07:00
target_core_spc.c scsi: target: core: Set MULTIP bit for se_device with multiple ports 2022-09-15 21:40:58 -04:00
target_core_stat.c scsi: target: core: De-RCU of se_lun and se_lun acl 2022-08-01 19:36:02 -04:00
target_core_tmr.c scsi: target: Fix multiple LUN_RESET handling 2023-05-11 23:03:19 +09:00
target_core_tpg.c scsi: target: Move sess cmd counter to new struct 2023-05-11 23:03:19 +09:00
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 genetlink: start to validate reserved header bytes 2022-08-29 12:47:15 +01:00
target_core_xcopy.c scsi: target: Pass in cmd counter to use during cmd setup 2023-05-11 23:03:19 +09:00
target_core_xcopy.h scsi: target: core: Change the way target_xcopy_do_work() sets restiction on max I/O 2023-05-11 23:03:19 +09:00