The keyboard driver used to be protected via spl* interrupt priority calls but as with the rest of the kernel was migrated to use the Giant lock (mutex). The spl calls are NOPs but may be confusing; remove them and add assertions that Giant is held. PR: 206680
Details
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
This seems ok. There is some conflation between the "bus topo" lock (which is Giant under the hood) and Giant: kbd_allocate() is called via DEVICE_ATTACH and is formally locked by the former, whereas cdev entry points are locked by Giant (via D_NEEDGIANT).
sys/dev/kbd/kbd.c | ||
---|---|---|
372 | I think this function is unused, BTW. Maybe better to leave it though. |
There is some conflation between the "bus topo" lock (which is Giant under the hood) and Giant
I will mention this in the commit message. I think it's fine, the assertion will either be a small item to address with bus topology locking work or will be removed if kbd is brought out from under Giant.
sys/dev/kbd/kbd.c | ||
---|---|---|
372 | I am grepping through all commits now to confirm. |
sys/dev/kbd/kbd.c | ||
---|---|---|
372 | Indeed, the only commits referencing kbd_change_callback in the tree are: R10:617b90803690a7ece8e76a49803385516bac380b (introduction) |