WSL2-Linux-Kernel/drivers/s390/scsi
Dinghao Liu 4e2f83952b scsi: zfcp: Fix a double put in zfcp_port_enqueue()
commit b481f644d9 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-10 21:59:05 +02:00
..
Makefile
zfcp_aux.c scsi: zfcp: Fix a double put in zfcp_port_enqueue() 2023-10-10 21:59:05 +02:00
zfcp_ccw.c
zfcp_dbf.c scsi: zfcp: fix kernel doc comments 2021-09-08 14:23:31 +02:00
zfcp_dbf.h
zfcp_def.h scsi: zfcp: Fix indentation coding style issue 2021-04-15 22:19:39 -04: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: Clean up sysfs code for SFP diagnostics 2021-04-15 22:19:40 -04:00
zfcp_erp.c
zfcp_ext.h scsi: zfcp: Clean up sysfs code for SFP diagnostics 2021-04-15 22:19:40 -04:00
zfcp_fc.c scsi: zfcp: Defer fc_rport blocking until after ADISC response 2023-08-11 15:13:55 +02:00
zfcp_fc.h scsi: zfcp: Fix missing auto port scan and thus missing target ports 2022-08-17 14:24:16 +02:00
zfcp_fsf.c scsi: zfcp: Fix double free of FSF request when qdio send fails 2022-11-26 09:24:47 +01:00
zfcp_fsf.h
zfcp_qdio.c scsi: zfcp: fix kernel doc comments 2021-09-08 14:23:31 +02:00
zfcp_qdio.h scsi: zfcp: Lift Request Queue tasklet & timer from qdio 2021-04-15 22:19:40 -04:00
zfcp_reqlist.h
zfcp_scsi.c scsi: core: Introduce scsi_build_sense() 2021-05-31 22:48:21 -04:00
zfcp_sysfs.c scsi: zfcp: Report port fc_security as unknown early during remote cable pull 2021-07-12 21:51:50 -04:00
zfcp_unit.c scsi: zfcp: fix kernel doc comments 2021-09-08 14:23:31 +02:00