Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

throne_tracker: skip iterate if failed to open dir #1832

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kernel/throne_tracker.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,13 @@ void search_manager(const char *path, int depth, struct list_head *uid_data)
file = ksu_filp_open_compat(pos->dirpath, O_RDONLY | O_NOFOLLOW, 0);
if (IS_ERR(file)) {
pr_err("Failed to open directory: %s, err: %ld\n", pos->dirpath, PTR_ERR(file));
return;
goto skip_iterate;
}

iterate_dir(file, &ctx.ctx);
filp_close(file, NULL);
}

skip_iterate:
list_del(&pos->list);
if (pos != &data)
kfree(pos);
Expand Down
Loading