linux-stable/drivers/s390/scsi
Dinghao Liu b481f644d9 scsi: zfcp: Fix a double put in zfcp_port_enqueue()
When device_register() fails, zfcp_port_release() will be called after
put_device(). As a result, zfcp_ccw_adapter_put() will be called twice: one
in zfcp_port_release() and one in the error path after device_register().
So the reference on the adapter object is doubly put, which may lead to a
premature free. Fix this by adjusting the error tag after
device_register().

Fixes: f3450c7b91 ("[SCSI] zfcp: Replace local reference counting with common kref")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Link: https://lore.kernel.org/r/20230923103723.10320-1-dinghao.liu@zju.edu.cn
Acked-by: Benjamin Block <bblock@linux.ibm.com>
Cc: stable@vger.kernel.org # v2.6.33+
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2023-09-27 11:31:20 -04:00
..
Makefile
zfcp_aux.c scsi: zfcp: Fix a double put in zfcp_port_enqueue() 2023-09-27 11:31:20 -04:00
zfcp_ccw.c
zfcp_dbf.c scsi: zfcp: Trace when request remove fails after qdio send fails 2023-02-21 22:00:51 -05:00
zfcp_dbf.h
zfcp_def.h scsi: zfcp: Change the type of all fsf request id fields and variables to u64 2023-02-21 22:00:51 -05:00
zfcp_diag.c scsi: zfcp: Clean up sysfs code for SFP diagnostics 2021-04-15 22:19:40 -04:00
zfcp_diag.h scsi: zfcp: Drop redundant "the" in the comments 2022-07-07 17:33:58 -04:00
zfcp_erp.c
zfcp_ext.h scsi: zfcp: Trace when request remove fails after qdio send fails 2023-02-21 22:00:51 -05:00
zfcp_fc.c scsi: zfcp: Defer fc_rport blocking until after ADISC response 2023-07-25 21:54:05 -04:00
zfcp_fc.h scsi: zfcp: Fix missing auto port scan and thus missing target ports 2022-08-01 19:50:00 -04:00
zfcp_fsf.c scsi: zfcp: Trace when request remove fails after qdio send fails 2023-02-21 22:00:51 -05:00
zfcp_fsf.h
zfcp_qdio.c s390/qdio: split do_QDIO() 2021-12-06 14:42:25 +01:00
zfcp_qdio.h scsi: zfcp: Change the type of all fsf request id fields and variables to u64 2023-02-21 22:00:51 -05:00
zfcp_reqlist.h scsi: zfcp: Change the type of all fsf request id fields and variables to u64 2023-02-21 22:00:51 -05:00
zfcp_scsi.c scsi: zfcp: Declare SCSI host template const 2023-03-24 19:19:20 -04:00
zfcp_sysfs.c scsi: zfcp: Declare zfcp_sdev_attrs as static 2022-07-07 17:33:58 -04:00
zfcp_unit.c scsi: zfcp: fix kernel doc comments 2021-09-08 14:23:31 +02:00