From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Feb 19 22:00:30 2005 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9AA2216A4CE for ; Sat, 19 Feb 2005 22:00:30 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FAAB43D39 for ; Sat, 19 Feb 2005 22:00:30 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j1JM0Usa071004 for ; Sat, 19 Feb 2005 22:00:30 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j1JM0UF9070999; Sat, 19 Feb 2005 22:00:30 GMT (envelope-from gnats) Resent-Date: Sat, 19 Feb 2005 22:00:30 GMT Resent-Message-Id: <200502192200.j1JM0UF9070999@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, frank@exit.com Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8975916A4CE; Sat, 19 Feb 2005 21:57:29 +0000 (GMT) Received: from tinker.exit.com (tinker.exit.com [206.223.0.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 255D743D45; Sat, 19 Feb 2005 21:57:29 +0000 (GMT) (envelope-from frank@exit.com) Received: from realtime.exit.com (realtime [206.223.0.5]) by tinker.exit.com (8.13.1/8.13.1) with ESMTP id j1JLvVlS076369; Sat, 19 Feb 2005 13:57:31 -0800 (PST) (envelope-from frank@exit.com) Received: from realtime.exit.com (localhost [127.0.0.1]) by realtime.exit.com (8.13.1/8.12.9) with ESMTP id j1JLvSrV017023; Sat, 19 Feb 2005 13:57:28 -0800 (PST) (envelope-from frank@realtime.exit.com) Received: (from frank@localhost) by realtime.exit.com (8.13.1/8.13.1/Submit) id j1JLvSaZ017022; Sat, 19 Feb 2005 13:57:28 -0800 (PST) (envelope-from frank) Message-Id: <200502192157.j1JLvSaZ017022@realtime.exit.com> Date: Sat, 19 Feb 2005 13:57:28 -0800 (PST) From: Frank Mayhar To: FreeBSD-gnats-submit@FreeBSD.org cc: danfe@FreeBSD.org Subject: ports/77750: Missing locking in ports/nvidia-driver X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: frank@exit.com List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2005 22:00:30 -0000 >Number: 77750 >Category: ports >Synopsis: Missing locking in ports/nvidia-driver >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Feb 19 22:00:29 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Frank Mayhar >Release: FreeBSD 6.0-CURRENT i386 >Organization: Exit Consulting >Environment: System: FreeBSD lap 6.0-CURRENT FreeBSD 6.0-CURRENT #14: Sat Feb 19 12:04:13 PST 2005 root@lap:/home/obj/usr/src/sys/AUTON i386 I've been tracking down an intermittent hard hang on my Dell Inspiron 5160 today and ran across this. It turns out there's a call to vm_page_wakeup() that doesn't hold the object lock across the call. It turned up when I turned on INVARIANTS to try to track down the hang. I don't know if this will fix my problem, but it's certainly a suspect and was trivial to fix. Patch enclosed. >Description: --ELM1108850248-16978-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII >How-To-Repeat: >Fix: Attached. --ELM1108850248-16978-0_ Content-Transfer-Encoding: 7bit Content-Type: text/x-patch Content-Disposition: attachment; filename=nvidia-driver.diff Content-Description: --- /dev/null Sat Feb 19 13:49:56 2005 +++ nvidia-driver/files/patch-src::nvidia_subr.c Sat Feb 19 13:23:34 2005 @@ -0,0 +1,18 @@ +--- src/nvidia_subr.c.orig Sat Feb 19 13:19:54 2005 ++++ src/nvidia_subr.c Sat Feb 19 13:22:47 2005 +@@ -1115,10 +1115,15 @@ + + #if __FreeBSD_version < 500000 + vm_page_wire(m); ++#else ++ VM_OBJECT_LOCK(m->object); + #endif + vm_page_lock_queues(); + vm_page_wakeup(m); + vm_page_unlock_queues(); ++#if __FreeBSD_version >= 500000 ++ VM_OBJECT_UNLOCK(m->object); ++#endif + } + + at->object = object; --ELM1108850248-16978-0_-- >Release-Note: >Audit-Trail: >Unformatted: