Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jul 2008 12:09:53 GMT
From:      Weongyo Jeong <weongyo@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 145323 for review
Message-ID:  <200807161209.m6GC9ro4041555@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=145323

Change 145323 by weongyo@weongyo_ws on 2008/07/16 12:09:23

	need a thread lock before calling sched_prio().  If not, it will cause
	a panic.

Affected files ...

.. //depot/projects/ndisusb/sys/compat/ndis/subr_ntoskrnl.c#5 edit

Differences ...

==== //depot/projects/ndisusb/sys/compat/ndis/subr_ntoskrnl.c#5 (text+ko) ====

@@ -4311,12 +4311,14 @@
 	else
 		old = LOW_REALTIME_PRIORITY;
 
+	thread_lock(td);
 	if (pri == HIGH_PRIORITY)
 		sched_prio(td, PRI_MIN_KERN);
 	if (pri == LOW_REALTIME_PRIORITY)
 		sched_prio(td, PRI_MIN_KERN + (PRI_MAX_KERN - PRI_MIN_KERN) / 2);
 	if (pri == LOW_PRIORITY)
 		sched_prio(td, PRI_MAX_KERN);
+	thread_unlock(td);
 
 	return old;
 }



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