From: Markus Elfring <Markus.Elfring@web.de>
To: cocci@inria.fr, kernel-janitors@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: [RFC] Detecting missing null pointer checks after memory allocations
Date: Sat, 1 Nov 2025 13:42:56 +0100 [thread overview]
Message-ID: <52e58416-d75f-4a47-9555-88a99d664069@web.de> (raw)
Hello,
I got into the mood to try another simple source code search out which
can be achieved also by the means of the semantic patch language.
@display@
expression size, source, target;
@@
target =
(
*kmalloc
|
*vmalloc
|
*malloc
)(...);
memcpy(target, source, size);
It can be determined then from the generated diff file that mentioned
implementation details can be found at 11 places (4 source files) of
the software “Linux next-20251031”.
Will such analysis information trigger further collateral evolution?
Regards,
Markus
reply other threads:[~2025-11-01 12:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=52e58416-d75f-4a47-9555-88a99d664069@web.de \
--to=markus.elfring@web.de \
--cc=cocci@inria.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@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;
as well as URLs for NNTP newsgroup(s).