From owner-svn-src-all@FreeBSD.ORG Thu Jul 8 21:02:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 880F0106564A; Thu, 8 Jul 2010 21:02:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 762638FC12; Thu, 8 Jul 2010 21:02:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o68L2WGM026588; Thu, 8 Jul 2010 21:02:32 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o68L2WSR026586; Thu, 8 Jul 2010 21:02:32 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201007082102.o68L2WSR026586@svn.freebsd.org> From: Andriy Gapon Date: Thu, 8 Jul 2010 21:02:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209831 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2010 21:02:32 -0000 Author: avg Date: Thu Jul 8 21:02:31 2010 New Revision: 209831 URL: http://svn.freebsd.org/changeset/base/209831 Log: MFC r209247: lock_profile_release_lock: do not compare unsigned with zero Note: no MFC to stable/7 Modified: stable/8/sys/kern/subr_lock.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/subr_lock.c ============================================================================== --- stable/8/sys/kern/subr_lock.c Thu Jul 8 20:57:37 2010 (r209830) +++ stable/8/sys/kern/subr_lock.c Thu Jul 8 21:02:31 2010 (r209831) @@ -600,7 +600,7 @@ lock_profile_release_lock(struct lock_ob struct lock_profile_object *l; struct lock_prof_type *type; struct lock_prof *lp; - u_int64_t holdtime; + u_int64_t curtime, holdtime; struct lpohead *head; int spin; @@ -628,9 +628,11 @@ lock_profile_release_lock(struct lock_ob lp = lock_profile_lookup(lo, spin, l->lpo_file, l->lpo_line); if (lp == NULL) goto release; - holdtime = nanoseconds() - l->lpo_acqtime; - if (holdtime < 0) + curtime = nanoseconds(); + if (curtime < l->lpo_acqtime) goto release; + holdtime = curtime - l->lpo_acqtime; + /* * Record if the lock has been held longer now than ever * before.