From cf8c8f2bb8fe8ec71a1083dc75729975bd5ec584 Mon Sep 17 00:00:00 2001 From: Wang Han <416810799@qq.com> Date: Sat, 22 Feb 2025 22:07:05 +0800 Subject: [PATCH] Fix reference count leak in nuke_ext4_sysfs() We need to call path_put() to decrease the refcount leak. --- kernel/core_hook.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/core_hook.c b/kernel/core_hook.c index 109f97c13da6..db77e77417aa 100644 --- a/kernel/core_hook.c +++ b/kernel/core_hook.c @@ -236,10 +236,12 @@ static void nuke_ext4_sysfs() { const char* name = sb->s_type->name; if (strcmp(name, "ext4") != 0) { pr_info("nuke but module aren't mounted\n"); + path_put(&path); return; } ext4_unregister_sysfs(sb); + path_put(&path); } int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,