Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Feb 2005 13:57:28 -0800 (PST)
From:      Frank Mayhar <frank@exit.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        danfe@FreeBSD.org
Subject:   ports/77750: Missing locking in ports/nvidia-driver
Message-ID:  <200502192157.j1JLvSaZ017022@realtime.exit.com>
Resent-Message-ID: <200502192200.j1JM0UF9070999@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502192157.j1JLvSaZ017022>