Revert part of r331264: disable interrupts before disabling WP.

We might otherwise be preempted, leaving WP disabled while another
thread runs on the CPU.

Reported by:	kib
X-MFC with:	r331264
This commit is contained in:
Mark Johnston 2018-03-20 21:36:35 +00:00
parent 793c98590a
commit 1de56ac728
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331268

View File

@ -146,11 +146,14 @@ fbt_invop(uintptr_t addr, struct trapframe *frame, uintptr_t rval)
void
fbt_patch_tracepoint(fbt_probe_t *fbt, fbt_patchval_t val)
{
register_t intr;
bool old_wp;
intr = intr_disable();
old_wp = disable_wp();
*fbt->fbtp_patchpoint = val;
restore_wp(old_wp);
intr_restore(intr);
}
int