From: Dan Carpenter <dan.carpenter@linaro.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Dave Penkler <dpenkler@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] gpib: fluke: Fix an error handling path in fluke_dma_read()
Date: Tue, 9 Dec 2025 16:47:58 +0300 [thread overview]
Message-ID: <aTgojlpyUwqBrQLh@stanley.mountain> (raw)
In-Reply-To: <a7b70a8c5dda16c2ddfab4309b4371b91d0ebc34.1765004481.git.christophe.jaillet@wanadoo.fr>
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)
prev parent reply other threads:[~2025-12-09 13:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-06 7:02 [PATCH] gpib: fluke: Fix an error handling path in fluke_dma_read() Christophe JAILLET
2025-12-09 13:47 ` Dan Carpenter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aTgojlpyUwqBrQLh@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dpenkler@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox