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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Acked-by: Benjamin Block <[email protected]>
Cc: [email protected] # v2.6.33+
Signed-off-by: Martin K. Petersen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 s390/zcore: fix race when reading from hardware system area 2022-08-25 11:18:05 +02:00
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 s390/lcs: Fix return type of lcs_start_xmit() 2023-01-18 11:41:36 +01:00
scsi scsi: zfcp: Fix a double put in zfcp_port_enqueue() 2023-10-10 21:46:42 +02:00
virtio
Makefile