skipping locks, mutex_owned, usb

Andriy Gapon avg at FreeBSD.org
Fri Aug 26 19:25:05 UTC 2011


on 26/08/2011 21:28 Andriy Gapon said the following:
[snip]
> Another observation is that when the kernel code calls into syscons code
> (kern_cons.c) it doesn't acquire the Giant.  It seems that the kernel calls
> syscons input routines only in some very special situations like very early boot
> (pause after each line option), late shutdown stage ("press any key to...") and
> ddb command prompt.
[snip]
> Hmm, but it's actually the kbd poll(TRUE) call itself that can be racy-ish...

As I was going to argue with myself that there actually should not be any race
here, because interrupts should already be disabled in the special cases, I
suddenly realized that I forgot about yet another special case, which is
actually not special enough - the mountroot prompt.  And I think that this is
the case which is the most troublesome comparing to all other cases.

-- 
Andriy Gapon


More information about the freebsd-arch mailing list