Date: Mon, 08 Apr 2002 13:37:55 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Josef Karthauser <joe@tao.org.uk> Cc: current@freebsd.org, David Wolfskill <david@catwhisker.org> Subject: Re: panic "sleeping without a mutex" in usb_task_thread Message-ID: <XFMail.20020408133755.jhb@FreeBSD.org> In-Reply-To: <20020408175952.GA83305@genius.tao.org.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 08-Apr-2002 Josef Karthauser wrote: > On Mon, Apr 08, 2002 at 12:33:40PM -0400, John Baldwin wrote: > >> show witness isn't useful to most people so I would avoid it unless someone >> explicitly asks for it. The problem here is likely due to the >> usb_task_thread() not locking Giant when it starts up. > > We probably want this: Probably unless some USB specific locks are added instead, but this is the easier fix for the time being. > Index: usb.c > =================================================================== > RCS file: /home/ncvs/src/sys/dev/usb/usb.c,v > retrieving revision 1.75 > diff -u -5 -r1.75 usb.c > --- usb.c 7 Apr 2002 14:21:32 -0000 1.75 > +++ usb.c 8 Apr 2002 17:58:38 -0000 > @@ -423,10 +423,14 @@ > usb_task_thread(void *arg) > { > struct usb_task *task; > int s; > > +#ifdef __FreeBSD__ > + mtx_lock(&Giant); > +#endif > + > DPRINTF(("usb_task_thread: start\n")); > > s = splusb(); > for (;;) { > task = TAILQ_FIRST(&usb_all_tasks); > > > Joe -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020408133755.jhb>