Date: Thu, 08 Feb 2001 20:21:06 -0700 From: Chuck Paterson <cp@bsdi.com> To: freebsd-arch@FreeBSD.ORG Subject: usb, clists, spltty, splbio Message-ID: <200102090321.f193L6k00368@grendel.bsdi.com>
next in thread | raw e-mail | index | archive | help
I have been mucking with making moused talk to a usb joystick. This all turned out pretty straight forward, all user land code in moused talking to the hid device. The problem is that the kernel crashes randomly, more often as the system get more loaded. A couple of times I got a panic in the clist code, but it really didn't show anything direct. Oh yah, this is with stable, not current. Reading through the code I found what looks like a problem. The hid, and other usb code use clists. The various usb code is protected by splusb which is a defined as splbio. The function b_to_q() and all the other clist code use spltty. I changed the definition of spltty from GENSPL(spltty, |=, tty_imask, 14) to GENSPL(spltty, |=, tty_imask | bio_imask, 14) and the crashes appear to have gone away. I say appear, it has run longer now than it has before, but it hasn't been up much more than twice as long yet. I am not quite sure the best way to deal with this. The only idea I have thought of that I like at all is to create a splclist() which is the or of tty and bio and put that into the code that mucks with clists, perhaps just the allocation/free routines. Comments Chuck To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102090321.f193L6k00368>