kernel: restore setting KTS_NONE
The 'trap style' variable records how a process has trapped into the kernel (hardware/software interrupt, or one of the other trap instructions). KTS_NONE indicates the process isn't trapped into the kernel at all and is useful for sanity checking. The KTS_NONE reset was inadvertently removed while removing some debugging code and this commit restores it.
This commit is contained in:
parent
75c515e5f8
commit
7f1018b145
@ -564,8 +564,6 @@ void restore_user_context(struct proc *p)
|
|||||||
#define TYPES 10
|
#define TYPES 10
|
||||||
static int restores[TYPES], n = 0;
|
static int restores[TYPES], n = 0;
|
||||||
|
|
||||||
p->p_seg.p_kern_trap_style = KTS_NONE;
|
|
||||||
|
|
||||||
if(trap_style >= 0 && trap_style < TYPES)
|
if(trap_style >= 0 && trap_style < TYPES)
|
||||||
restores[trap_style]++;
|
restores[trap_style]++;
|
||||||
|
|
||||||
@ -578,6 +576,8 @@ void restore_user_context(struct proc *p)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
p->p_seg.p_kern_trap_style = KTS_NONE;
|
||||||
|
|
||||||
if(trap_style == KTS_SYSENTER) {
|
if(trap_style == KTS_SYSENTER) {
|
||||||
restore_user_context_sysenter(p);
|
restore_user_context_sysenter(p);
|
||||||
NOT_REACHABLE;
|
NOT_REACHABLE;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user