Skip to content

Commit 9cb2d52

Browse files
Haoxiang Limartinkpetersen
authored andcommitted
scsi: elx: efct: Fix I/O leak on unsupported additional CDB
efct_dispatch_fcp_cmd() allocates an efct_io before dispatching an unsolicited FCP command. If the command has an unsupported additional CDB, the function returns -EIO before handing the IO to the SCSI layer. Free the allocated IO before returning from this error path. Fixes: f45ae6a ("scsi: elx: efct: Unsolicited FC frame processing routines") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com> Reviewed-by: Daniel Wagner <dwagner@suse.de> Link: https://patch.msgid.link/20260622075844.832871-1-haoxiang_li2024@163.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent dccf3b1 commit 9cb2d52

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/scsi/elx/efct/efct_unsol.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ efct_dispatch_fcp_cmd(struct efct_node *node, struct efc_hw_sequence *seq)
385385

386386
if (cmnd->fc_flags & FCP_CFL_LEN_MASK) {
387387
efc_log_err(efct, "Additional CDB not supported\n");
388+
efct_scsi_io_free(io);
388389
return -EIO;
389390
}
390391
/*

0 commit comments

Comments
 (0)