From 624322832fb5f3dbdad69983850227d702f846b9 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 26ac5a4805cc..883444bce553 100644 --- a/kernel/core_hook.c +++ b/kernel/core_hook.c @@ -232,10 +232,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,