Re: patch review & testing request for fill_kinfo_proc() and friends

From: Don Lewis <truckman_at_FreeBSD.org>
Date: Sun, 2 Oct 2005 16:36:50 -0700 (PDT)
On  2 Oct, To: current_at_freebsd.org wrote:
> Attached is a patch that fixes locking problems in fill_kinfo_proc() and
> related functions.  The patch is larger than I initially anticipated
> because I had to refactor the code in order to get the locking right.
> 
> I'd like to commit it to HEAD soon so that it can be MFC'ed in time for
> 6.0-RC1, but it really needs review and testing of all the sysctl and
> linprocfs functionality.  This patch also applies cleanly to RELENG_6.

[snip]

I found and fixed a few whitespace nits and a minor buglet that didn't
affect functionality.  This patch has passed all of my testing, so I
committed it to HEAD to give it wider exposure.

------ Forwarded message ------
    From: Don Lewis <truckman_at_FreeBSD.org>
 Subject: cvs commit: src/sys/kern kern_proc.c
    Date: Sun, 2 Oct 2005 23:27:56 +0000 (UTC)
      To: src-committers_at_FreeBSD.org, cvs-src_at_FreeBSD.org, cvs-all_at_FreeBSD.org

truckman    2005-10-02 23:27:56 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             kern_proc.c 
  Log:
  Always wire the sysctl output buffer in sysctl_kern_proc() before
  calling sysctl_out_proc().  -- fix from jhb
  
  Move the code in fill_kinfo_thread() that gathers data from struct proc
  into the new function fill_kinfo_proc_only().
  
  Change all callers of fill_kinfo_thread() to call both
  fill_kinfo_proc_only() and fill_kinfo() thread.  When gathering
  data from a multi-threaded process, fill_kinfo_proc_only() only needs
  to be called once.
  
  Grab sched_lock before accessing the process thread list or calling
  fill_kinfo_thread().
  
  PR:             kern/84684
  MFC after:      3 days
  
  Revision  Changes    Path
  1.232     +113 -95   src/sys/kern/kern_proc.c
Received on Sun Oct 02 2005 - 21:36:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:44 UTC