svn commit: r227784 - head/sys/kern

Kostik Belousov kostikbel at gmail.com
Mon Nov 21 10:51:12 UTC 2011


On Mon, Nov 21, 2011 at 10:36:57AM +0000, Sergey Kandaurov wrote:
> Author: pluknet
> Date: Mon Nov 21 10:36:57 2011
> New Revision: 227784
> URL: http://svn.freebsd.org/changeset/base/227784
> 
> Log:
>   Use the acquired reference to the vmspace instead of direct dereferencing
>   of p->p_vmspace like it is done in sysctl_kern_proc_vmmap().
> 
> Modified:
>   head/sys/kern/kern_proc.c
> 
> Modified: head/sys/kern/kern_proc.c
> ==============================================================================
> --- head/sys/kern/kern_proc.c	Mon Nov 21 08:12:36 2011	(r227783)
> +++ head/sys/kern/kern_proc.c	Mon Nov 21 10:36:57 2011	(r227784)
> @@ -1528,7 +1528,7 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_A
>  	}
>  	kve = malloc(sizeof(*kve), M_TEMP, M_WAITOK);
>  
> -	map = &p->p_vmspace->vm_map;	/* XXXRW: More locking required? */
> +	map = &vm->vm_map;	/* XXXRW: More locking required? */
It makes sense to remove the XXXRW comment, from both places.

>  	vm_map_lock_read(map);
>  	for (entry = map->header.next; entry != &map->header;
>  	    entry = entry->next) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20111121/988519cc/attachment.pgp


More information about the svn-src-head mailing list