A Hang In The Linux Kernel Can Happen If Trying To Read A Broken Floppy Then Ejecting It
Going into 2022 the Linux kernel's floppy driver continues to see new code improvements and fixes.
While it's been about two decades since I've last touched a floppy, that isn't the case for everyone. The Linux kernel even as we roll towards 2022 continues seeing the occasional fixes and issued discovered in its long-standing driver. Earlier this year were a few floppy patches though it ended up regressing things and has since been fixed.
There are a few floppy driver patches expected now for the Linux 5.17 kernel, including one for a possible hang that could be triggered in the watchdog code.
Due to a change made to the floppy code back in 2012, it's been possible since then to relatively consistently trigger a hang within its watchdog code. A behavioral change could lead to a reproducible hang if trying to read a broken floppy disc and then ejecting it while the I/O is still being attempted/retried. That hang will be fixed with Linux 5.17 should you still be using floppies and running such systems with modern kernels.
The fix in Linux 5.17 will cancel the work on ejection and not wait for the watchdog to return/finish to avoid the hang in cases such as a broken floppy.
So looking forward to the Linux 5.17 kernel that will be out in the early months of 2022, you can expect to see floppy patches still flopping around the kernel.
It will be interesting to see ultimately how long the floppy disk driver remains within the mainline kernel. Floppies are still used within some industrial equipment still but such systems don't tend to see new major kernel versions. Even among such use-cases, with the COVID-19 pandemic has led to the retirement of some older, larger and less fuel efficient aircraft that still widely relied on floppies but again not likely running recent kernel versions. In any case, it will still likely continue sticking in mainline for as long as someone is willing to maintain the code.