Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Nov 2011 12:51:08 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Sergey Kandaurov <pluknet@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r227784 - head/sys/kern
Message-ID:  <20111121105108.GE50300@deviant.kiev.zoral.com.ua>
In-Reply-To: <201111211036.pALAavS7039188@svn.freebsd.org>
References:  <201111211036.pALAavS7039188@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--sKTXwkTcrvVuA/Nz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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
>=20
> Log:
>   Use the acquired reference to the vmspace instead of direct dereferenci=
ng
>   of p->p_vmspace like it is done in sysctl_kern_proc_vmmap().
>=20
> Modified:
>   head/sys/kern/kern_proc.c
>=20
> Modified: head/sys/kern/kern_proc.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- 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 =3D malloc(sizeof(*kve), M_TEMP, M_WAITOK);
> =20
> -	map =3D &p->p_vmspace->vm_map;	/* XXXRW: More locking required? */
> +	map =3D &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 =3D map->header.next; entry !=3D &map->header;
>  	    entry =3D entry->next) {

--sKTXwkTcrvVuA/Nz
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEYEARECAAYFAk7KLRsACgkQC3+MBN1Mb4i0HQCffjla7xswBxEIbBOfZFVGDsTX
2wwAoJj8tZl9nb6bArOGisM20bP8cfDm
=UAUL
-----END PGP SIGNATURE-----

--sKTXwkTcrvVuA/Nz--



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