DragonFly commits List (threaded) for 2008-04
DragonFly BSD
DragonFly commits List (threaded) for 2008-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/sys/bus/usb usb.c


From: "Sepherosa Ziehau" <sepherosa@xxxxxxxxx>
Date: Sun, 27 Apr 2008 06:27:55 +0800

On Mon, Apr 21, 2008 at 11:23 PM, Matthew Dillon
<dillon@crater.dragonflybsd.org> wrote:
> dillon      2008/04/21 08:23:22 PDT
>
>  DragonFly src repository
>
>   Modified files:
>     sys/bus/usb          usb.c
>   Log:
>   Add an interlock for certain usb task operations.
>
>   Revision  Changes    Path
>   1.40      +50 -15    src/sys/bus/usb/usb.c
>
>
>  http://www.dragonflybsd.org/cvsweb/src/sys/bus/usb/usb.c.diff?r1=1.39&r2=1.40&f=u

@@ -368,15 +368,21 @@ usb_add_task(usbd_device_handle dev, str

 	crit_enter();

+	/*
+	 * Wait if task is currently executing
+	 */
+	while (task->queue == -2)
+		tsleep(task, 0, "usbwttsk", hz);

This will cause deadlock, if task's function wants to enqueue itself.
rum(4) or ural(4) will do that kind of stuffs (the recursion is down
deep into 802.11 stack)

Best Regards,
sephe

-- 
Live Free or Die



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]