kernel - Remove mplock from KTRACE paths
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 27 Sep 2016 21:39:03 +0000 (14:39 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 16 Oct 2016 21:41:13 +0000 (14:41 -0700)
commit84f5e3457abecf35e96ebd677b64300098a2818b
tree34cd070528a770d1de84e02a289206be3823f33e
parent7a251b1ce74b779c7caa2e75f4b75e91889b0634
kernel - Remove mplock from KTRACE paths

* The mplock is no longer needed for KTRACE, ktrace writes are serialized
  by the vnode lock and everything else is MPSAFE.  Note that this change
  means that even fast system calls may interleave in the ktrace output on
  a multi-threaded program.

* Fix ktrace bug related to vkernels.  The syscall2() code assumes that
  no tokens are held on entry (since we are coming from usermode), but
  a system call made from the vkernel may actually be nested inside
  another syscall2().  The mplock KTRACE held caused this to assert in
  the nested syscall2().  The removal of the mplock from the ktrace path
  also fixes this bug.

* Minor comment adjustment in vm_vmspace.c.

Reported-by: tuxillo
sys/kern/sys_generic.c
sys/platform/pc64/x86_64/trap.c
sys/vm/vm_vmspace.c