mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: cocci@inria.fr, tools@kernel.org, kernel-janitors@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] Detecting unchecked return values (with SmPL)?
Date: Sun, 6 Dec 2026 13:52:33 +0100	[thread overview]
Message-ID: <1c9f48d5-4d49-4dbb-ac3b-092435fb3589@web.de> (raw)
In-Reply-To: <214cdbae-b798-4ea4-8c1e-9eabdfd1663a@web.de>

> CWE-252: Unchecked Return Value

How will development interests evolve further if it could be determined also
with the help of another script variant (like the following) for the semantic
patch language that the software “Linux next-20261204” contains at least
75 function calls (in 35 source files) where the return value was not immediately
stored in a variable according to a single selected identifier?

@display5@
expression var;
statement is, es;
@@
(if (request_resource(...)) is else es
|if (request_resource(...) < 0) is else es
|var = request_resource(...)
|
*if (request_resource(...) == 0) is
|
*request_resource(...)
)


Can any coccicheck script variations become more helpful for similar use cases?

Regards,
Markus

      parent reply	other threads:[~2026-12-06 12:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 13:00 Markus Elfring
2026-11-30 13:05 ` Julia Lawall
2026-11-30 13:25   ` [cocci] " Markus Elfring
2026-11-30 13:52     ` Julia Lawall
2026-11-30 14:00   ` Markus Elfring
2026-11-30 15:49     ` Julia Lawall
2026-11-30 15:58       ` Markus Elfring
2026-11-30 16:44 ` Markus Elfring
2026-12-01  8:46 ` Markus Elfring
2026-12-01 12:00 ` Markus Elfring
2026-12-01 18:00 ` Markus Elfring
2026-12-06 12:52 ` Markus Elfring [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=1c9f48d5-4d49-4dbb-ac3b-092435fb3589@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@inria.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tools@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

all inboxes | Powered by JetHome®