git: kernel - Remove mplock from KTRACE paths

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Sep 27 14:42:08 PDT 2016


commit c2e7bb204e282735a7e954dd5bab8e6e0b509eb4
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue Sep 27 14:39:03 2016 -0700

    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

Summary of changes:
 sys/kern/sys_generic.c          |  4 ----
 sys/platform/pc64/x86_64/trap.c | 13 +++++--------
 sys/vm/vm_vmspace.c             |  8 +++++---
 3 files changed, 10 insertions(+), 15 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c2e7bb204e282735a7e954dd5bab8e6e0b509eb4


-- 
DragonFly BSD source repository



More information about the Commits mailing list