Files
linux/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 <[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]>
2023-09-27 11:31:20 -04:00
..
…
2021-12-06 14:42:25 +01:00