aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ref_tracker.c
diff options
context:
space:
mode:
authorJeff Layton <[email protected]>2025-08-08 11:45:23 +0000
committerJakub Kicinski <[email protected]>2025-08-12 03:07:44 +0000
commit52966bf71de98fef4ca7b3be1349adc7459d6d53 (patch)
tree70994f9d79667f524a9098b58d76a693c5bbeaec /lib/ref_tracker.c
parentnet: usb: qmi_wwan: add Telit Cinterion FN990A w/audio composition (diff)
downloadkernel-52966bf71de98fef4ca7b3be1349adc7459d6d53.tar.gz
kernel-52966bf71de98fef4ca7b3be1349adc7459d6d53.zip
ref_tracker: use %p instead of %px in debugfs dentry name
As Kees points out, this is a kernel address leak, and debugging is not a sufficiently good reason to expose the real kernel address. Fixes: 65b584f53611 ("ref_tracker: automatically register a file in debugfs for a ref_tracker_dir") Reported-by: Kees Cook <[email protected]> Closes: https://lore.kernel.org/netdev/202507301603.62E553F93@keescook/ Signed-off-by: Jeff Layton <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'lib/ref_tracker.c')
-rw-r--r--lib/ref_tracker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ref_tracker.c b/lib/ref_tracker.c
index a9e6ffcff04b..cce12287708e 100644
--- a/lib/ref_tracker.c
+++ b/lib/ref_tracker.c
@@ -434,7 +434,7 @@ void ref_tracker_dir_debugfs(struct ref_tracker_dir *dir)
if (dentry && !xa_is_err(dentry))
return;
- ret = snprintf(name, sizeof(name), "%s@%px", dir->class, dir);
+ ret = snprintf(name, sizeof(name), "%s@%p", dir->class, dir);
name[sizeof(name) - 1] = '\0';
if (ret < sizeof(name)) {