patch review & testing request for fill_kinfo_proc() and friends
Don Lewis
truckman at FreeBSD.org
Sun Oct 2 16:36:58 PDT 2005
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
More information about the freebsd-current
mailing list