From 7840976da5073f560b12aaaf595dc1941ae65773 Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Tue, 20 May 2008 12:34:30 +0000 Subject: [PATCH] Drop Giant before calling kproc_exit(), so we don't trigger assertion in kproc_exit(). Discussed with: imp --- sys/dev/usb/usb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index 6f92c77c77ec..0cbf6bdaffa6 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -453,6 +453,8 @@ usb_event_thread(void *arg) wakeup(sc); DPRINTF(("usb_event_thread: exit\n")); + while (mtx_owned(&Giant)) + mtx_unlock(&Giant); kproc_exit(0); } @@ -490,6 +492,8 @@ usb_task_thread(void *arg) wakeup(&taskq->taskcreated); DPRINTF(("usb_event_thread: exit\n")); + while (mtx_owned(&Giant)) + mtx_unlock(&Giant); kproc_exit(0); }