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-prev] [day] [month] [year] [list]
Message-ID: <aTgojlpyUwqBrQLh@stanley.mountain>
Date: Tue, 9 Dec 2025 16:47:58 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Dave Penkler <dpenkler@...il.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] gpib: fluke: Fix an error handling path in
 fluke_dma_read()

On Sat, Dec 06, 2025 at 08:02:25AM +0100, Christophe JAILLET wrote:
> It is strange to call dma_unmap_single() with its 'dev' argument
> explicitly set to NULL.
> It is likely to crash.

I've added the assumption to Smatch that it will crash.  Which as you
say is not true, but I think it probably is the correct assumption,
right?

This is a one liner in Smatch.

regards,
dan carpenter

diff --git a/smatch_dereference.c b/smatch_dereference.c
index 15ad885af085..acd70ef9dec4 100644
--- a/smatch_dereference.c
+++ b/smatch_dereference.c
@@ -34,6 +34,7 @@ static struct deref_info fn_deref_table[] = {
 	{ "__fortify_strlen", 0, "$" },
 	{ "spinlock_check", 0, "$" },
 	{ "devm_platform_ioremap_resource_byname", 1, "$" },
+	{ "dma_unmap_single_attrs", 0, "$" },
 };
 
 void add_dereference_hook(expr_func *fn)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ