diff --git a/kernel/sucompat.c b/kernel/sucompat.c index 56c430c46ba6..f19b2212bec3 100644 --- a/kernel/sucompat.c +++ b/kernel/sucompat.c @@ -134,7 +134,7 @@ int ksu_handle_execveat_sucompat(int *fd, struct filename **filename_ptr, __maybe_unused static int faccessat_handler_pre(struct kprobe *p, struct pt_regs *regs) { - int *dfd = (int *)PT_REGS_PARM1(regs); + int *dfd = (int *)&PT_REGS_PARM1(regs); const char __user **filename_user = (const char **)&PT_REGS_PARM2(regs); int *mode = (int *)&PT_REGS_PARM3(regs); // Both sys_ and do_ is C function @@ -150,7 +150,7 @@ static int sys_faccessat_handler_pre(struct kprobe *p, struct pt_regs *regs) #else struct pt_regs *real_regs = regs; #endif - int *dfd = (int *)PT_REGS_PARM1(real_regs); + int *dfd = (int *)&PT_REGS_PARM1(real_regs); const char __user **filename_user = (const char **)&PT_REGS_PARM2(real_regs); int *mode = (int *)&PT_REGS_PARM3(real_regs); @@ -261,4 +261,4 @@ void ksu_sucompat_exit() { unregister_kprobe(&newfstatat_kp); unregister_kprobe(&faccessat_kp); #endif -} \ No newline at end of file +}