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>
index | next in thread | previous in thread | raw e-mail
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: >> 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. Thanks for your comment, committed. [Just though, why it was not done so far and if that comment may relate to something else.. ] > >> vm_map_lock_read(map); >> for (entry = map->header.next; entry != &map->header; >> entry = entry->next) { > -- wbr, pluknethelp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAE-mSOK9cNOuPTMnWT9T0Uk7o=ZqcH9otJGjVtxGmNhxNbR7bA>
