* [PATCH v1] netfs: use kfree_sensitive() instend of kfree() in fscache_free_volume()
@ 2024-01-08 10:14 Minjie Du
2024-01-08 13:55 ` David Howells
0 siblings, 1 reply; 2+ messages in thread
From: Minjie Du @ 2024-01-08 10:14 UTC (permalink / raw)
To: David Howells, moderated list:FILESYSTEMS [NETFS LIBRARY],
open list:FILESYSTEMS [NETFS LIBRARY],
open list
Cc: opensource.kernel, Minjie Du
key might contain private information, so use kfree_sensitive to free it.
In fscache_free_volume() use kfree_sensitive().
Signed-off-by: Minjie Du <duminjie@vivo.com>
---
fs/netfs/fscache_volume.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/netfs/fscache_volume.c b/fs/netfs/fscache_volume.c
index cdf991bdd9de..648a7d6eaa6a 100644
--- a/fs/netfs/fscache_volume.c
+++ b/fs/netfs/fscache_volume.c
@@ -397,7 +397,7 @@ static void fscache_free_volume(struct fscache_volume *volume)
fscache_unhash_volume(volume);
trace_fscache_volume(volume->debug_id, 0, fscache_volume_free);
- kfree(volume->key);
+ kfree_sensitive(volume->key);
kfree(volume);
fscache_stat_d(&fscache_n_volumes);
fscache_put_cache(cache, fscache_cache_put_volume);
--
2.39.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v1] netfs: use kfree_sensitive() instend of kfree() in fscache_free_volume()
2024-01-08 10:14 [PATCH v1] netfs: use kfree_sensitive() instend of kfree() in fscache_free_volume() Minjie Du
@ 2024-01-08 13:55 ` David Howells
0 siblings, 0 replies; 2+ messages in thread
From: David Howells @ 2024-01-08 13:55 UTC (permalink / raw)
To: Minjie Du
Cc: dhowells, linux-cachefs, linux-fsdevel, linux-kernel, opensource.kernel
You sent this twice - I replied to the other post. But this is an unnecessary
use of kfree_sensitive() as the key is made public.
David
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-08 13:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-08 10:14 [PATCH v1] netfs: use kfree_sensitive() instend of kfree() in fscache_free_volume() Minjie Du
2024-01-08 13:55 ` David Howells
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®