crash in tty code in 6.1.. fixed since?

Hans Petter Selasky hselasky at c2i.net
Fri Jul 13 08:58:47 UTC 2007


On Friday 13 July 2007 10:38, LI Xin wrote:
> Hans Petter Selasky wrote:
> [...]
>
> > Maybe related:
> >
> > Regarding the keyboard system which is also Giant locked, we should add
> > assert Giant statements, because I see several callers doing calls into
> > the keyboard system without holding Giant!
>
> I think that is a good idea.  By adding these assertions our user
> community would be able to catch more under-exercised codepath under
> their workload.
>
> Do you already have some patch to add these assertions?

No. But I have added several assertions to my "ukbd.c", mainly in the 
callbacks. From time to time they trigger, and then I just return, because 
there is no other choice. That means, if you try to lock Giant, you will most 
likely get a locking order reversal.

The worst example is the mechanism when you print something and scroll lock 
led is enabled. Then printf will call the ukbd driver to clear the scroll 
lock led! Yikes. Ouuch. "ukbd.c" must out of Giant!

http://www.turbocat.net/~hselasky/isdn4bsd/sources/src/sys/dev/usb/ukbd.c

--HPS


More information about the freebsd-current mailing list