From owner-svn-src-stable@FreeBSD.ORG Thu Jan 29 11:13:03 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFBD0106576C; Thu, 29 Jan 2009 11:13:03 +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 92BB78FC12; Thu, 29 Jan 2009 11:13:03 +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 n0TBD3NG052509; Thu, 29 Jan 2009 11:13:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0TBD32e052506; Thu, 29 Jan 2009 11:13:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901291113.n0TBD32e052506@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 29 Jan 2009 11:13:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187889 - in stable/7/sys: . compat/linprocfs contrib/pf dev/cxgb fs/procfs kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2009 11:13:04 -0000 Author: kib Date: Thu Jan 29 11:13:03 2009 New Revision: 187889 URL: http://svn.freebsd.org/changeset/base/187889 Log: MFC r186563: vm_map_lock_read() does not increment map->timestamp, so we should compare map->timestamp with saved timestamp after map read lock is reacquired, not with saved timestamp + 1. The only consequence of the +1 was unconditional lookup of the next map entry, though. Modified: stable/7/sys/ (props changed) stable/7/sys/compat/linprocfs/linprocfs.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/fs/procfs/procfs_map.c stable/7/sys/kern/kern_proc.c Modified: stable/7/sys/compat/linprocfs/linprocfs.c ============================================================================== --- stable/7/sys/compat/linprocfs/linprocfs.c Thu Jan 29 11:08:56 2009 (r187888) +++ stable/7/sys/compat/linprocfs/linprocfs.c Thu Jan 29 11:13:03 2009 (r187889) @@ -976,7 +976,7 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) error = 0; break; } - if (last_timestamp + 1 != map->timestamp) { + if (last_timestamp != map->timestamp) { /* * Look again for the entry because the map was * modified while it was unlocked. Specifically, Modified: stable/7/sys/fs/procfs/procfs_map.c ============================================================================== --- stable/7/sys/fs/procfs/procfs_map.c Thu Jan 29 11:08:56 2009 (r187888) +++ stable/7/sys/fs/procfs/procfs_map.c Thu Jan 29 11:13:03 2009 (r187889) @@ -231,7 +231,7 @@ procfs_doprocmap(PFS_FILL_ARGS) error = 0; break; } - if (last_timestamp + 1 != map->timestamp) { + if (last_timestamp != map->timestamp) { /* * Look again for the entry because the map was * modified while it was unlocked. Specifically, Modified: stable/7/sys/kern/kern_proc.c ============================================================================== --- stable/7/sys/kern/kern_proc.c Thu Jan 29 11:08:56 2009 (r187888) +++ stable/7/sys/kern/kern_proc.c Thu Jan 29 11:13:03 2009 (r187889) @@ -1502,7 +1502,7 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_A vm_map_lock_read(map); if (error) break; - if (last_timestamp + 1 != map->timestamp) { + if (last_timestamp != map->timestamp) { vm_map_lookup_entry(map, addr - 1, &tmp_entry); entry = tmp_entry; } @@ -1679,7 +1679,7 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR vm_map_lock_read(map); if (error) break; - if (last_timestamp + 1 != map->timestamp) { + if (last_timestamp != map->timestamp) { vm_map_lookup_entry(map, addr - 1, &tmp_entry); entry = tmp_entry; }