If CPU happens to be in usermode when a T_RESERVED trap occured,
then trapsignal is called with ksi.ksi_signo = 0. For debugging kernels, that should end up in panic, for non-debugging kernels behaviour is undefined. Do panic regardeless of execution mode at the moment of trap. Reviewed by: jhb MFC after: 1 month
This commit is contained in:
parent
65553dd979
commit
a1bfaca761
@ -253,6 +253,11 @@ trap(struct trapframe *frame)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (type == T_RESERVED) {
|
||||
trap_fatal(frame, 0);
|
||||
goto out;
|
||||
}
|
||||
|
||||
#ifdef HWPMC_HOOKS
|
||||
/*
|
||||
* CPU PMCs interrupt using an NMI. If the PMC module is
|
||||
|
@ -225,6 +225,11 @@ trap(struct trapframe *frame)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (type == T_RESERVED) {
|
||||
trap_fatal(frame, 0);
|
||||
goto out;
|
||||
}
|
||||
|
||||
#ifdef HWPMC_HOOKS
|
||||
/*
|
||||
* CPU PMCs interrupt using an NMI so we check for that first.
|
||||
|
Loading…
x
Reference in New Issue
Block a user