lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241002083131.18135-1-alessandro.zanni87@gmail.com>
Date: Wed,  2 Oct 2024 10:31:28 +0200
From: Alessandro Zanni <alessandro.zanni87@...il.com>
To: robin.murphy@....com,
	joro@...tes.org,
	will@...nel.org
Cc: Alessandro Zanni <alessandro.zanni87@...il.com>,
	iommu@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	skhan@...uxfoundation.org,
	anupnewsmail@...il.com
Subject: [PATCH] iommu/dma: Potential uninitialized variable in iommu_dma_unmap_sg

This patch fix the possibility to have the variable 'start'
not initialized.

Smatch tool raises the error:
drivers/iommu/dma-iommu.c:1510
iommu_dma_unmap_sg() error: uninitialized symbol 'start'.

Signed-off-by: Alessandro Zanni <alessandro.zanni87@...il.com>
---
 drivers/iommu/dma-iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index 2a9fa0c8cc00..5b2596f4b24f 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -1496,7 +1496,7 @@ int iommu_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
 void iommu_dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
 		enum dma_data_direction dir, unsigned long attrs)
 {
-	dma_addr_t end = 0, start;
+	dma_addr_t end = 0, start = 0;
 	struct scatterlist *tmp;
 	int i;
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ