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

Sepherosa Ziehau sepherosa at gmail.com
Sat Apr 26 15:32:56 PDT 2008


On Mon, Apr 21, 2008 at 11:23 PM, Matthew Dillon
<dillon at 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





More information about the Commits mailing list