diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 7f162421c750..3ffb8702a84f 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -934,7 +934,7 @@ amd64_syscall(struct thread *td, int traced) ksiginfo_t ksi; #ifdef DIAGNOSTIC - if (!TRAPF_USERMODE(frame)) { + if (!TRAPF_USERMODE(td->td_frame)) { panic("syscall"); /* NOT REACHED */ }