From owner-svn-src-head@FreeBSD.ORG Wed Dec 10 16:11:09 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B149E1065677; Wed, 10 Dec 2008 16:11:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1C968FC39; Wed, 10 Dec 2008 16:11:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAGB9Pf035736; Wed, 10 Dec 2008 16:11:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAGB9ik035734; Wed, 10 Dec 2008 16:11:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812101611.mBAGB9ik035734@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 10 Dec 2008 16:11:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185864 - in head/sys: compat/linprocfs fs/procfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 16:11:09 -0000 Author: kib Date: Wed Dec 10 16:11:09 2008 New Revision: 185864 URL: http://svn.freebsd.org/changeset/base/185864 Log: Relock user map earlier, to have the lock held when break leaves the loop earlier due to sbuf error. Pointy hat to: me Submitted by: dchagin Modified: head/sys/compat/linprocfs/linprocfs.c head/sys/fs/procfs/procfs_map.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Wed Dec 10 16:02:54 2008 (r185863) +++ head/sys/compat/linprocfs/linprocfs.c Wed Dec 10 16:11:09 2008 (r185864) @@ -969,11 +969,11 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) ); if (freename) free(freename, M_TEMP); + vm_map_lock_read(map); if (error == -1) { error = 0; break; } - vm_map_lock_read(map); if (last_timestamp + 1 != map->timestamp) { /* * Look again for the entry because the map was Modified: head/sys/fs/procfs/procfs_map.c ============================================================================== --- head/sys/fs/procfs/procfs_map.c Wed Dec 10 16:02:54 2008 (r185863) +++ head/sys/fs/procfs/procfs_map.c Wed Dec 10 16:11:09 2008 (r185864) @@ -219,12 +219,11 @@ procfs_doprocmap(PFS_FILL_ARGS) if (freepath != NULL) free(freepath, M_TEMP); - + vm_map_lock_read(map); if (error == -1) { error = 0; break; } - vm_map_lock_read(map); if (last_timestamp + 1 != map->timestamp) { /* * Look again for the entry because the map was