Re: crash in tty code in 6.1.. fixed since?

From: Hans Petter Selasky <hselasky_at_c2i.net>
Date: Fri, 13 Jul 2007 10:58:48 +0200
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
Received on Fri Jul 13 2007 - 06:58:47 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:14 UTC