Date: Mon, 21 Nov 2011 15:23:26 +0300 From: Sergey Kandaurov <pluknet@freebsd.org> To: Kostik Belousov <kostikbel@gmail.com> 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: <CAE-mSOK9cNOuPTMnWT9T0Uk7o=ZqcH9otJGjVtxGmNhxNbR7bA@mail.gmail.com> In-Reply-To: <20111121105108.GE50300@deviant.kiev.zoral.com.ua> References: <201111211036.pALAavS7039188@svn.freebsd.org> <20111121105108.GE50300@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On 21 November 2011 14:51, Kostik Belousov <kostikbel@gmail.com> wrote: > 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: >> =A0 Use the acquired reference to the vmspace instead of direct derefere= ncing >> =A0 of p->p_vmspace like it is done in sysctl_kern_proc_vmmap(). >> >> Modified: >> =A0 head/sys/kern/kern_proc.c >> >> 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 =A0 =A0 =A0 =A0(r= 227783) >> +++ head/sys/kern/kern_proc.c Mon Nov 21 10:36:57 2011 =A0 =A0 =A0 =A0(r= 227784) >> @@ -1528,7 +1528,7 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_A >> =A0 =A0 =A0 } >> =A0 =A0 =A0 kve =3D malloc(sizeof(*kve), M_TEMP, M_WAITOK); >> >> - =A0 =A0 map =3D &p->p_vmspace->vm_map; =A0 =A0/* XXXRW: More locking r= equired? */ >> + =A0 =A0 map =3D &vm->vm_map; =A0 =A0 =A0/* XXXRW: More locking require= d? */ > It makes sense to remove the XXXRW comment, from both places. Thanks for your comment, committed. [Just though, why it was not done so far and if that comment may relate to something else.. ] > >> =A0 =A0 =A0 vm_map_lock_read(map); >> =A0 =A0 =A0 for (entry =3D map->header.next; entry !=3D &map->header; >> =A0 =A0 =A0 =A0 =A0 entry =3D entry->next) { > --=20 wbr, pluknet
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAE-mSOK9cNOuPTMnWT9T0Uk7o=ZqcH9otJGjVtxGmNhxNbR7bA>