Thread (8 messages) 8 messages, 4 authors, 2025-03-03

Re: [RESEND] qed: Move a variable assignment behind a null pointer check in two functions

From: Kory Maincent <kory.maincent@bootlin.com>
Date: 2025-03-03 17:35:35
Also in: cocci, kernel-janitors, lkml

On Mon, 3 Mar 2025 11:28:29 +0300
Dan Carpenter [off-list ref] wrote:
On Mon, Mar 03, 2025 at 09:22:58AM +0100, Markus Elfring wrote:
quoted
quoted
The assignment:

	p_rx = &p_ll2_conn->rx_queue;

does not dereference "p_ll2_conn".  It just does pointer math.  So the
original code works fine.  
Is there a need to clarify affected implementation details any more?
https://wiki.sei.cmu.edu/confluence/display/c/EXP34-C.+Do+not+dereference+null+pointers
 
This is not a NULL dereference.  It's just pointer math.

regards,
dan carpenter
Feel free to ignore Markus, he has a long history of sending unhelpful reviews,
comments or patches and continues to ignore repeated requests to stop. He is
already on the ignore lists of several maintainers.
There is a lot of chance that he is a bot.

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help