A Hang In The Linux Kernel Can Happen If Trying To Read A Broken Floppy Then Ejecting It
Written by Michael Larabel in Hardware on 3 December 2021 at 06:39 AM EST. 25 Comments
HARDWARE --
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.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week