Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Oct 2005 14:45:42 -0700 (PDT)
From:      Don Lewis <truckman@FreeBSD.org>
To:        apelisse@gmail.com
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: freebsd-5.4-stable panics
Message-ID:  <200510012145.j91LjgsL013885@gw.catspoiler.org>
In-Reply-To: <61c746830509300224g3d79cbe4ve55e8b0b27004fc3@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 30 Sep, Antoine Pelisse wrote:
>  Hi Robert,
> I don't think your patch is correct, the total linked list can be broken
> while the lock is released, thus just passing the link may not be enough
> I have submitted a PR[1] for this a month ago but nobody took care of it yet

There are two problems with your patch:

	sched_lock needs to be held while iterating over the threads

	sysctl_kern_proc() calls sysctl_out_proc() multiple times in a
	loop in the !KERN_PROC_PID case, so the buffer needs to be wired
	before calling sysctl_out_proc().

Is _PHOLD()/_PRELE() needed if we don't drop PROC_LOCK?

Passing a size estimate to sysctl_wire_old_buffer() is desirable, but
sysctl_out_proc() would need some restructuring to do this correctly.




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