ports/77750: Missing locking in ports/nvidia-driver
Frank Mayhar
frank at exit.com
Sat Feb 19 22:00:30 UTC 2005
>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 at 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:
More information about the freebsd-ports-bugs
mailing list