Bug 153981 - floppy.c broken, causing failure to start VirtualBox VM on floppy-fitted computers
Summary: floppy.c broken, causing failure to start VirtualBox VM on floppy-fitted comp...
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 high
Assignee: drivers_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-25 22:11 UTC by reserv0
Modified: 2016-09-15 07:59 UTC (History)
0 users

See Also:
Kernel Version: 4.6.0 to 4.7.3
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
Floppy driver fix for Linux kernel v4.7.2 (4.38 KB, patch)
2016-08-25 22:11 UTC, reserv0
Details | Diff
Patch for v4.7.0/1/3 and v4.6.* (5.08 KB, patch)
2016-09-09 08:44 UTC, reserv0
Details | Diff

Description reserv0 2016-08-25 22:11:09 UTC
Created attachment 230271 [details]
Floppy driver fix for Linux kernel v4.7.2

When I updated from Linux kernel v4.1 to v4.6, I got hit by a bug in the floppy driver, which causes failures to start VirtualBox VMs (full bug report available here: https://www.virtualbox.org/ticket/15581 ).

The VirtualBox team seems to consider it a kernel bug, and I produced a patch which reverts the floppy.c driver to its v4.1 behaviour (while keeping the required changes for kernel v4.7.2). See the attached patch.

Not being a Linux kernel developer and lacking time, I didn't bother investigating deeper the reasons for that bug (all what matters for me is that Linux works again as it used to with older kernels, with regards to floppy & VirtualBox).
Comment 1 reserv0 2016-09-09 08:44:52 UTC
Created attachment 232811 [details]
Patch for v4.7.0/1/3 and v4.6.*
Comment 2 reserv0 2016-09-09 08:45:06 UTC
Kernel v4.7.3 floppy driver is still broken, but it got "floppy: fix open(O_ACCMODE) for ioctl-only open" reverted (reversion commit is 0e0af957499ee15afb7e0ce2e9fa83b5708808fd), I'm attaching a new patch that applies to v4.7.3 (and all other v4.6 and 4.7 versions).

I'm also marking this bug as a regression, which it is.
Comment 3 reserv0 2016-09-15 07:59:36 UTC
Good news !

Linux kernel v4.7.4 finally reverted the culprit code (commit a15f1d0d13bee12b54e198286b91a83752f45b07): Revert "floppy: refactor open() flags handling"

This bug is now fixed.

Note You need to log in before you can comment on or make changes to this bug.