From 30de57f5b4e681609e4be32bd37896ef011af268 Mon Sep 17 00:00:00 2001 From: Wang Han <416810799@qq.com> Date: Sun, 23 Feb 2025 10:42:24 +0800 Subject: [PATCH] Fix reference count leak in nuke_ext4_sysfs() (#2467) We need to call path_put() to decrease the refcount. --- 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,