From: Minjie Du <duminjie@vivo.com>
To: David Howells <dhowells@redhat.com>,
linux-cachefs@redhat.com (moderated list:FILESYSTEMS [NETFS
LIBRARY]),
linux-fsdevel@vger.kernel.org (open list:FILESYSTEMS [NETFS
LIBRARY]), linux-kernel@vger.kernel.org (open list)
Cc: opensource.kernel@vivo.com, Minjie Du <duminjie@vivo.com>
Subject: [PATCH v1] netfs: use kfree_sensitive() instend of kfree() in fscache_free_volume()
Date: Mon, 8 Jan 2024 18:14:02 +0800 [thread overview]
Message-ID: <20240108101404.19818-1-duminjie@vivo.com> (raw)
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
next reply other threads:[~2024-01-08 10:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-08 10:14 Minjie Du [this message]
2024-01-08 13:55 ` David Howells
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=20240108101404.19818-1-duminjie@vivo.com \
--to=duminjie@vivo.com \
--cc=dhowells@redhat.com \
--cc=linux-cachefs@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=opensource.kernel@vivo.com \
/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
all inboxes | Powered by JetHome®