svn commit: r331268 - head/sys/cddl/dev/fbt/x86

Mark Johnston markj at FreeBSD.org
Tue Mar 20 21:36:36 UTC 2018


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


More information about the svn-src-all mailing list