android_kernel_motorola_sm6375/drivers/s390
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dinghao Liu 810248a129 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 21:46:42 +02:00
..
block s390/dasd: fix hanging device after request requeue 2023-09-23 10:59:38 +02:00
char
cio s390/cio: unregister device when the only path is gone 2023-06-28 10:18:41 +02:00
crypto s390/zcrypt: don't leak memory if dev_set_name() fails 2023-09-23 10:59:59 +02:00
net
scsi scsi: zfcp: Fix a double put in zfcp_port_enqueue() 2023-10-10 21:46:42 +02:00
virtio
Makefile