kernel - Remove mplock from KTRACE paths
commitc2e7bb204e282735a7e954dd5bab8e6e0b509eb4
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 27 Sep 2016 21:39:03 +0000 (27 14:39 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 27 Sep 2016 21:41:56 +0000 (27 14:41 -0700)
tree6bacf04fa862ab6a59f20fb06efe41cc804a26d1
parent5a9835ae839593ab8105e055dadacd6d02a8e684
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