Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jan 2011 20:33:12 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/kern kern_exec.c kern_exit.c kern_fork.c kern_ktrace.c kern_proc.c src/sys/sys ktrace.h
Message-ID:  <201101252033.p0PKXVSE046216@repoman.freebsd.org>

index | next in thread | raw e-mail

jhb         2011-01-25 20:33:12 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_8)
    sys/kern             kern_exec.c kern_exit.c kern_fork.c 
                         kern_ktrace.c kern_proc.c 
    sys/sys              ktrace.h 
  Log:
  SVN rev 217838 on 2011-01-25 20:33:12Z by jhb
  
  MFC 211514,214158:
  - There isn't really a need to hold the ktrace mutex just to read the
    value of p_traceflag that is stored in the kinfo_proc structure.
  - When disabling ktracing on a process, free any pending requests that
    may be left.  This fixes a memory leak that can occur when tracing is
    disabled on a process via disabling tracing of a specific file (or if
    an I/O error occurs with the tracefile) if the process's next system
    call is exit().  The trace disabling code clears p_traceflag, so exit1()
    doesn't do any KTRACE-related cleanup leading to the leak.  I chose to
    make the free'ing of pending records synchronous rather than patching
    exit1().
  - Move KTRACE-specific logic out of kern_(exec|exit|fork).c and into
    kern_ktrace.c instead.  Make ktrace_mtx private to kern_ktrace.c as a
    result.
  
  Revision    Changes    Path
  1.337.2.7   +2 -10     src/sys/kern/kern_exec.c
  1.330.2.4   +1 -31     src/sys/kern/kern_exit.c
  1.306.2.5   +1 -15     src/sys/kern/kern_fork.c
  1.130.2.3   +102 -24   src/sys/kern/kern_ktrace.c
  1.285.2.14  +0 -6      src/sys/kern/kern_proc.c
  1.35.2.2    +2 -2      src/sys/sys/ktrace.h


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101252033.p0PKXVSE046216>