Date: Sun, 2 Oct 2005 16:36:50 -0700 (PDT) From: Don Lewis <truckman@FreeBSD.org> To: current@FreeBSD.org Subject: Re: patch review & testing request for fill_kinfo_proc() and friends Message-ID: <200510022336.j92NaogU016869@gw.catspoiler.org> In-Reply-To: <200510020908.j9298dAX014736@gw.catspoiler.org>
index | next in thread | previous in thread | raw e-mail
On 2 Oct, To: current@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@FreeBSD.org>
Subject: cvs commit: src/sys/kern kern_proc.c
Date: Sun, 2 Oct 2005 23:27:56 +0000 (UTC)
To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@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
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510022336.j92NaogU016869>
