The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: driver-core@lists.linux.dev, "Danilo Krummrich" <dakr@kernel.org>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Lyude Paul" <lyude@redhat.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Zijun Hu" <quic_zijuhu@quicinc.com>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] driver core: faux: Move a variable assignment behind a condition check in faux_device_destroy()
Date: Sun, 12 Jul 2026 18:39:36 +0200	[thread overview]
Message-ID: <2026071222-barracuda-applause-51e8@gregkh> (raw)
In-Reply-To: <d96e797a-2d06-42e0-a3de-972b4f71a5ef@web.de>

On Sun, Jul 12, 2026 at 06:23:47PM +0200, Markus Elfring wrote:
> >> The address of a data structure member was determined before
> >> a corresponding null pointer check in the implementation of
> >> the function “faux_device_destroy”.
> >>
> >> Thus avoid the risk for undefined behaviour by moving the assignment
> >> for the variable “dev” behind a condition check.
> > 
> > There is no such "undefined behavior" here, sorry, please fix your tools.
> 
> Please take another look at related information sources.
> 
> EXP34-C: Do not dereference null pointers
> https://cmu-sei.github.io/secure-coding-standards/sei-cert-c-coding-standard/rules/expressions-exp/exp34-c/
> 
> 
> See also:
> https://lore.kernel.org/kernel-janitors/d7a8e34b-e490-47fc-b892-886e1c799c4f@web.de/
> https://lkml.org/lkml/2026/7/2/2241

Please see the places in the past where I have rejected this very patch.
Nothing has changed since then.

thanks,

greg k-h

  reply	other threads:[~2026-07-12 16:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-12 13:56 [PATCH] driver core: faux: Move a variable assignment behind a condition check in faux_device_destroy() Markus Elfring
2026-07-12 14:09 ` Greg Kroah-Hartman
2026-07-12 16:23   ` Markus Elfring
2026-07-12 16:39     ` Greg Kroah-Hartman [this message]
2026-07-12 16:54       ` Markus Elfring

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=2026071222-barracuda-applause-51e8@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=Markus.Elfring@web.de \
    --cc=dakr@kernel.org \
    --cc=driver-core@lists.linux.dev \
    --cc=jic23@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=quic_zijuhu@quicinc.com \
    --cc=rafael@kernel.org \
    --cc=thomas.weissschuh@linutronix.de \
    /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