Skip to content

Commit

Permalink
Merge pull request #16 from mlm-games:ksu-upstream
Browse files Browse the repository at this point in the history
(From ksu 1.0.1) Mergable changes?
  • Loading branch information
mlm-games authored Sep 11, 2024
2 parents 2c10077 + b11b611 commit 2931222
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions kernel/include/ksu_hook.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ extern bool ksu_vfs_read_hook __read_mostly;
extern bool ksu_input_hook __read_mostly;

extern int ksu_handle_devpts(struct inode*);
#endif
3 changes: 1 addition & 2 deletions kernel/sucompat.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,7 @@ static int sys_newfstatat_handler_pre(struct kprobe *p, struct pt_regs *regs)
{
struct pt_regs *real_regs = PT_REAL_REGS(regs);
int *dfd = (int *)&PT_REGS_PARM1(real_regs);
const char __user **filename_user =
(const char **)&PT_REGS_PARM2(real_regs);
const char __user **filename_user = (const char **)&PT_REGS_PARM2(real_regs);
int *flags = (int *)&PT_REGS_SYSCALL_PARM4(real_regs);

return ksu_handle_stat(dfd, filename_user, flags);
Expand Down
4 changes: 2 additions & 2 deletions kernel/throne_tracker.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,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

0 comments on commit 2931222

Please sign in to comment.