From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E769420E023; Tue, 12 Aug 2025 19:17:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755026259; cv=none; b=Obqm4TFD41fKn95K12Z6x4IKpXk//B/TprulUgXmRkQPCQGOO/SgciXJLWSKByEj29/LirXLlS5HeRVynSUsptBRgCXCOQ5rbfqwQRygj8YoM2ks2t6I+kMJKyeOM8q9A5OiZ52xTF6lgYRuIiP/TkYr6sdlvSd5L1slziNIlkM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755026259; c=relaxed/simple; bh=OVgPpkjXyfC/wqFPHFgVKrp0+0Utfwhlc3am8McYNNU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Gjs4ZYU4UvTNrD/7rIrGtQWJaWkIDd+SCVa4k87YMY8Ne+a5w6DexHAp7sEM3srMuFWwp2SnMdvjxB5NxJr4Wb4c31r6aQBajQEPfJs6iXZqrAGqytRdHPssOV7lWw714FeydFikCNRHeSIZqbkvbajZbDqTo1YFTwaIuV/PRXs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tbuiZjwI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="tbuiZjwI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 557A2C4CEF1; Tue, 12 Aug 2025 19:17:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755026258; bh=OVgPpkjXyfC/wqFPHFgVKrp0+0Utfwhlc3am8McYNNU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tbuiZjwIFtFsJedgLiH6S0gSf5oX/oH8phYlCJIFxXe9RRz95DBfsX3ddyaHsc2HH AsPYyrdvIM1Q8INSU/ngE0KYUNgFjeI/KV1RjTGNr5yGfYeqbpFmQSrAizInhNpfbh xelHZzCrlDlKapSI05sK90SQPw+LbMhuZ+LhzaX0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Thomas Fourier , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 6.15 284/480] scsi: elx: efct: Fix dma_unmap_sg() nents value Date: Tue, 12 Aug 2025 19:48:12 +0200 Message-ID: <20250812174409.148021430@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250812174357.281828096@linuxfoundation.org> References: <20250812174357.281828096@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Fourier [ Upstream commit 3a988d0b65d7d1713ce7596eae288a293f3b938e ] The dma_unmap_sg() functions should be called with the same nents as the dma_map_sg(), not the value the map function returned. Fixes: 692e5d73a811 ("scsi: elx: efct: LIO backend interface routines") Signed-off-by: Thomas Fourier Link: https://lore.kernel.org/r/20250627114117.188480-2-fourier.thomas@gmail.com Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/elx/efct/efct_lio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/elx/efct/efct_lio.c b/drivers/scsi/elx/efct/efct_lio.c index 9ac69356b13e..bd3d489e56ae 100644 --- a/drivers/scsi/elx/efct/efct_lio.c +++ b/drivers/scsi/elx/efct/efct_lio.c @@ -382,7 +382,7 @@ efct_lio_sg_unmap(struct efct_io *io) return; dma_unmap_sg(&io->efct->pci->dev, cmd->t_data_sg, - ocp->seg_map_cnt, cmd->data_direction); + cmd->t_data_nents, cmd->data_direction); ocp->seg_map_cnt = 0; } -- 2.39.5