linux/drivers/scsi/elx/efct
WenTao Liang 2c007acf7b scsi: elx: efct: Fix refcount leak in efct_hw_io_abort()
When efct_hw_reqtag_alloc() fails in efct_hw_io_abort(), the error path
returns -ENOSPC without releasing the reference obtained via
kref_get_unless_zero() earlier in the function. All other error paths
correctly drop the reference. This causes a permanent reference leak on the
io_to_abort object.

Additionally, the abort_in_progress flag is left set to true on this path,
which means future abort attempts for the same I/O will immediately return
-EINPROGRESS even though the abort was never submitted, effectively
blocking recovery.

Fix this by adding the missing kref_put() call and reset abort_in_progress
to false, matching the cleanup done in the efct_hw_wq_write() failure path
below.

Cc: stable@vger.kernel.org
Fixes: 63de51327a ("scsi: elx: efct: Hardware I/O and SGL initialization")
Signed-off-by: WenTao Liang <vulab@iscas.ac.cn>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Link: https://patch.msgid.link/20260611053037.63756-1-vulab@iscas.ac.cn
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2026-07-12 22:21:22 -04:00
..
efct_driver.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
efct_driver.h isystem: trim/fixup stdarg.h and other headers 2021-08-19 09:02:55 +09:00
efct_hw_queues.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
efct_hw.c scsi: elx: efct: Fix refcount leak in efct_hw_io_abort() 2026-07-12 22:21:22 -04:00
efct_hw.h treewide: fix transposed "sign" typos and update spelling.txt 2026-06-17 15:37:47 -07:00
efct_io.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
efct_io.h
efct_lio.c scsi: target: Use driver completion preference by default 2026-02-28 21:04:02 -05:00
efct_lio.h
efct_scsi.c Merge branch '5.15/scsi-fixes' into 5.16/scsi-staging 2021-10-12 11:58:12 -04:00
efct_scsi.h
efct_unsol.c scsi: elx: efct: Fix I/O leak on unsupported additional CDB 2026-07-12 22:21:22 -04:00
efct_unsol.h
efct_xport.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
efct_xport.h