4 ms·
The device is buggy and the kernel is buggy. The device is buggy because it did something stupid; the kernel is buggy because it crashed in response. That's two
by marcan_42 5y ago
The device is buggy and the kernel is buggy. The device is buggy because it did something stupid; the kernel is buggy because it crashed in response. That's two independent bugs. Sometimes it isn't even buggy devices, just devices disconnecting at the wrong time. I've crashed my kernel with things as simple as devices rapidly reconnecting or simply ceasing to respond/timing out.
Most of the kernel bugs around this are state/race issues. Device disappears in the middle of kernel code that doesn't have proper error recovery, boom. That's a kernel bug that applies in normal circumstances too, not just under an adversarial device model, because USB is designed to be hotpluggable at any time. Doesn't matter if the device disappeared because it crashed or because the user yanked the cable; it's just easier to reproduce with a crashy device. And the error recovery logic is notoriously hard to get right, which is why I'm not surprised the kernel is still buggy after all these years.
- CyberRabbi 5y ago> which is why I'm not surprised the kernel is still buggy after all these years. allegedly still buggy :)
- marcan_42 5y agoDefinitely still buggy; I know for a fact it still oopses when certain USB things go wrong, which is by definition a bug.
- CyberRabbi 5y agoWhat? Why don’t you report this bug or submit a patch. If you have, can you link me to your report or patch?