From 29de74c9411e6ff9dfab520932fc06f44d051c3a Mon Sep 17 00:00:00 2001 From: backslashxx <118538522+backslashxx@users.noreply.github.com> Date: Tue, 10 Jun 2025 14:13:07 +0000 Subject: [PATCH] kernel: core_hook: fix missed path_put make sure to path_put() on all codepaths after kern_path() success Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com> Signed-off-by: rsuntk <90097027+rsuntk@users.noreply.github.com> --- kernel/core_hook.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/core_hook.c b/kernel/core_hook.c index 2d7bf0fb..5af2e73e 100644 --- a/kernel/core_hook.c +++ b/kernel/core_hook.c @@ -591,6 +591,7 @@ static void try_umount(const char *mnt, bool check_mnt, int flags) if (path.dentry != path.mnt->mnt_root) { // it is not root mountpoint, maybe umounted by others already. + path_put(&path); return; } @@ -604,6 +605,7 @@ static void try_umount(const char *mnt, bool check_mnt, int flags) #else ksu_sys_umount(mnt, flags); #endif + path_put(&path); } int ksu_handle_setuid(struct cred *new, const struct cred *old)