freebsd-nq/sys/dev
Ian Lepore 1cc7e361a6 When allocating a new keyboard at vt_upgrade() time, unwind any cngrabs
done on the old keyboard and then do the corresponding number of grabs
on the new keyboard.

This fixes a race that can leave the system with a non-functioning
keyboard.  It goes like this...

 - The bios claims there is an AT keyboard, atkbd attaches.
 - SI_SUB_INT_CONFIG_HOOKS runs.
 - USB probes devices. Devices begin attaching, including disks.
 - GELI prompts for a password for a just-attached disk, which results
   in a cngrab() while atkbd is the keyboard.
 - A USB keyboard attaches.
 - vt_upgrade() runs and switches the keyboard to the new USB keyboard,
   but because cngrab was never called for it, it's not activated and
   keystrokes are ignored.
 - Now there is no functional keyboard and no way to get one; even
   plugging in a different USB keyboard doesn't help, because the console
   is still grabbed, still waiting for a GELI pw.

Discussed with:	     ray@
2018-12-31 01:09:23 +00:00
..
aac
aacraid
acpi_support
acpica
adb
adlink
ae
age
agp
ahci
aic7xxx
al_eth
alc
ale
alpm
altera
amd_ecc_inject
amdgpio
amdpm
amdsbwd
amdsmb
amdsmn
amdtemp
amr
an
arcmsr
asmc
ata
ath
atkbdc
auxio
axgbe
bce
beri
bfe
bge
bhnd
bktr
bm
bnxt
bvm
bwi
bwn
bxe
cadence
cardbus
cas
ce
cesa
cfe
cfi
chromebook_platform
ciss
cmx
coretemp
cp
cpuctl
cpufreq
cs
ctau
cx
cxgb
cxgbe
cy
cyapa
dc
dcons
de
dme
dpaa
dpms
drm
drm2
dwc
e1000
ed
efidev
ena
ep
esp
et
etherswitch
evdev
ex
exca
extres
fb
fdc
fdt
fe
ffec
filemon
firewire
flash
fxp
gem
glxiic
glxsb
gpio
gxemul
hdmi
hifn
hme
hpt27xx
hptiop
hptmv
hptnr
hptrr
hwpmc
hyperv
ic
ichiic
ichsmb
ichwd
ida
if_ndis
iicbus
iir
imcsmb
intel
intpm
io
ioat
ipmi
ips
ipw
isci
iscsi
iscsi_initiator
iser
isl
ismt
isp
ispfw
iwi
iwm
iwn
ixgbe
ixl
jedec_dimm
jme
kbd
kbdmux
ksyms
le
led
lge
liquidio
malo
mbox
mc146818
md
mdio
mem
mfi
mge
mii
mk48txx
mlx
mlx4
mlx5
mly
mmc
mmcnull
mn
mpr
mps
mpt
mrsas
msk
mthca
mvs
mwl
mxge
my
nand
nctgpio
neta
netfpga10g/nf10bmac
netmap
nfe
nfsmb
nge
nmdm
ntb
null
nvd
nvdimm
nvme
nvram
nvram2env
oce
ocs_fc
ofw
otus
ow
pbio
pccard
pccbb
pcf
pci
pcn
pms
powermac_nvram
ppbus
ppc
proto
psci
pst
pty
puc
pwm
qlnx/qlnxe
qlxgb
qlxgbe
qlxge
quicc
ral
random
rc
rccgpio
re
rl
rndtest
rp
rt
rtwn
safe
sbni
scc
sdhci
sec
sf
sfxge
sge
siis
sio
sis
sk
smartpqi
smbus
smc
sn
snp
sound
speaker
spibus
ste
stge
sym
syscons
tcp_log
tdfx
terasic
ti
tl
tpm
trm
tsec
twa
twe
tws
tx
txp
uart
ubsec
usb
veriexec
vge
viapm
viawd
videomode
virtio
vkbd
vmware
vnic
vr
vt
vte
vx
watchdog
wb
wbwd
wi
wpi
wtap
xdma
xe
xen
xilinx
xl