Re: [PATCH v3] ssb: Fix potential NULL pointer dereference in ssb_device_uevent

From: Michael Büsch
Date: Fri Mar 08 2024 - 00:11:51 EST


On Thu, 7 Mar 2024 22:02:29 +0000
James Dutton <james.dutton@xxxxxxxxx> wrote:

> If one does a NULL check after it has been previously dereferenced,
> the compiler will totally remove the NULL check anyway,

I think the kernel uses -fno-delete-null-pointer-checks.

But anyway, this doesn't invalidate the point of having a NULL check.
The intent of the code was very clear.
So don't remove it.

--
Michael Büsch
https://bues.ch/

Attachment: pgpHlRV7FPQeU.pgp
Description: OpenPGP digital signature