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>] [day] [month] [year] [list]
Message-Id: <1385499075-1928-1-git-send-email-shuah.kh@samsung.com>
Date:	Tue, 26 Nov 2013 13:51:15 -0700
From:	Shuah Khan <shuah.kh@...sung.com>
To:	akpm@...ux-foundation.org, alexander.h.duyck@...el.com,
	dan.carpenter@...cle.com
Cc:	Shuah Khan <shuah.kh@...sung.com>, linux-kernel@...r.kernel.org,
	shuahkhan@...il.com
Subject: [PATCH linux-next] dma-debug: Fix coccinelle warnings in device_dma_allocations()

lib/dma-debug.c:740:11-16: ERROR: invalid reference to the index variable of the iterator on line 726

This error is a result of referencing entry->dev in dev_warn() when entry
might not be valid at the time of reference. Change dev_warn() to use input
parameter struct device *dev instead to print warning.

Signed-off-by: Shuah Khan <shuah.kh@...sung.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
---
 lib/dma-debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index e34865e..5f29445 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -737,7 +737,7 @@ static int device_dma_allocations(struct device *dev, struct dma_debug_entry **o
 	local_irq_restore(flags);
 
 	if (map_err_cnt)
-		dev_warn(entry->dev,
+		dev_warn(dev,
 			"DMA-API: device driver failed to check map errors: "
 			"[count] = %d\n", map_err_cnt);
 	return count;
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ