Skip to content

Commit

Permalink
Fix reference count leak in nuke_ext4_sysfs() (#2467)
Browse files Browse the repository at this point in the history
We need to call path_put() to decrease the refcount.
  • Loading branch information
aviraxp authored Feb 23, 2025
1 parent 6936520 commit 1feac4c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/core_hook.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1feac4c

Please sign in to comment.