android_kernel_samsung_sm8650/drivers/s390
Dinghao Liu cdf18e7585 scsi: zfcp: Fix a double put in zfcp_port_enqueue()
commit b481f644d9174670b385c3a699617052cd2a79d3 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 22:00:38 +02:00
..
block s390/dasd: fix string length handling 2023-09-13 09:43:03 +02:00
char s390/early: fix sclp_early_sccb variable lifetime 2023-03-10 09:32:53 +01:00
cio s390/cio: unregister device when the only path is gone 2023-06-28 11:12:37 +02:00
crypto s390/pkey: fix PKEY_TYPE_EP11_AES handling in PKEY_CLR2SECK2 IOCTL 2023-10-06 14:56:44 +02:00
net s390/qeth: Don't call dev_close/dev_open (DOWN/UP) 2023-08-11 12:08:17 +02:00
scsi scsi: zfcp: Fix a double put in zfcp_port_enqueue() 2023-10-10 22:00:38 +02:00
virtio virtio: Revert "virtio: find_vqs() add arg sizes" 2022-08-16 01:40:24 -04:00
Makefile s390: remove pointless drivers-y in drivers/s390/Makefile 2019-09-16 13:21:51 +02:00