Author: markj
Date: Tue Mar 20 21:36:35 2018
New Revision: 331268
URL: https://svnweb.freebsd.org/changeset/base/331268

Log:
  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

Modified:
  head/sys/cddl/dev/fbt/x86/fbt_isa.c

Modified: head/sys/cddl/dev/fbt/x86/fbt_isa.c
==============================================================================
--- head/sys/cddl/dev/fbt/x86/fbt_isa.c Tue Mar 20 21:31:18 2018        
(r331267)
+++ head/sys/cddl/dev/fbt/x86/fbt_isa.c Tue Mar 20 21:36:35 2018        
(r331268)
@@ -146,11 +146,14 @@ fbt_invop(uintptr_t addr, struct trapframe *frame, uin
 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
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to