Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



On Sat, May 16, 2009 at 12:02:00PM +0000, YAMAMOTO Takashi wrote:
> Module Name:  src
> Committed By: yamt
> Date:         Sat May 16 12:02:00 UTC 2009
> 
> Modified Files:
>       src/sys/kern: init_sysctl.c
> 
> Log Message:
> sysctl_doeproc:
>       - simplify.
>       - KERN_PROC: fix possible stale proc pointer dereference.
>       - KERN_PROC: don't do copyout with proc_lock held.

IIRC this used to work because it locked the userspace buffer into
physical memory earlier.
I've not looked at the change, but if you release proc_lock it is
very difficult to ensure you see every process [1], and that the
count of processes is correct.

[1] consider what happens if the proc table has to be extended,
or when a process is in a fork/exit loop.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index