Re: [PATCH] w1: Use kfree_sensitive() instead of memset(0) and kfree()
From: Krzysztof Kozlowski
Date: Mon Sep 30 2024 - 07:50:13 EST
On 30/09/2024 13:44, Thorsten Blum wrote:
> Use kfree_sensitive() to simplify w1_unref_slave() and remove the
> following Coccinelle/coccicheck warning reported by
> kfree_sensitive.cocci:
>
> WARNING opportunity for kfree_sensitive/kvfree_sensitive
So are you fixing coccinelle just to hide the warning or actually fixing
issue? Why this structure should be zeroed?
>
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
> ---
> Please note: this change assumes that #ifdef DEBUG is no longer needed
> and we should always zero out the memory.
But why are you assuming that? Your patch is not equivalent and I do not
see any explanation in commit msg why is that.
Best regards,
Krzysztof