Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A51546A5FA; Tue, 21 Jul 2026 17:28:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784654901; cv=none; b=X+r7JyiRv5N3O8N5BmNiTUVMhIYG859lsSTIXf9C+LZWr1hQ/HLGP52ABc+8LKkEbH2NIZyRPvPt/bqraDquCfoIWwgkqLZP20OGAa7IO7i3s0KV/puXgB1tZoj24NcHbR99y37UJd1ldGZbKcjRI0bll54ERN3V64aEJucWTXw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784654901; c=relaxed/simple; bh=v25OP9ETLMgkxnXsZHL6/Mt66g3nEt83o9VEjhcdzDQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QCc1bmwnoJw85/49F7Y0iJvHcfOdfBteX9Yd+FaaY6O0V8J4Imv7tzgP9M2vhgswo42EnjzLRX+WspMW4Qx7BpoV8x9jTWzZcXXDIjQSoV7vdFMnw/FrJwrKtBkqCdr0rp1geWD8aSbJ+rVA6ZChXLR0jH07wZ7Mj+YE8NmbWkc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2nIxjcGb; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="2nIxjcGb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71CF31F00A3D; Tue, 21 Jul 2026 17:28:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784654896; bh=fSnTp402dTxN+rcmkbTrUmZs+NvGBd+6Dft+6UwRFsE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=2nIxjcGbG7MoH6mWOwqi7X4ROSNc69jBnKalVnDtSKNwm6J3ZLeFPki3RLQtImSf0 nHLW425QTMSizCTMF4OsNpJSSPpQNSs4tkGxclrz1kqRpP8E/ten/LRIZER3QPNuLy 0F7ECJhRZBx8wlgZ14XFFVflvREhssutoN/TfGi4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Haoxiang Li , Daniel Wagner , "Martin K. Petersen" Subject: [PATCH 7.1 1878/2077] scsi: elx: efct: Fix I/O leak on unsupported additional CDB Date: Tue, 21 Jul 2026 17:25:51 +0200 Message-ID: <20260721152637.023990940@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152552.646164743@linuxfoundation.org> References: <20260721152552.646164743@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Haoxiang Li commit 9cb2d5291dbfe7bed565ead3337047dee9ed1064 upstream. 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: f45ae6aac0a0 ("scsi: elx: efct: Unsolicited FC frame processing routines") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li Reviewed-by: Daniel Wagner Link: https://patch.msgid.link/20260622075844.832871-1-haoxiang_li2024@163.com Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/elx/efct/efct_unsol.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/scsi/elx/efct/efct_unsol.c +++ b/drivers/scsi/elx/efct/efct_unsol.c @@ -385,6 +385,7 @@ efct_dispatch_fcp_cmd(struct efct_node * if (cmnd->fc_flags & FCP_CFL_LEN_MASK) { efc_log_err(efct, "Additional CDB not supported\n"); + efct_scsi_io_free(io); return -EIO; } /*