diff options
| author | Denis Efremov (Oracle) <efremov@linux.com> | 2026-09-24 15:28:25 +0400 |
|---|---|---|
| committer | Denis Efremov (Oracle) <efremov@linux.com> | 2026-10-05 18:59:41 +0400 |
| commit | bb38473f1bcb287567f2fa7980e483a778092504 (patch) | |
| tree | 652484bfa1decb43448cf1fcdd91622450f1818c /rust/kernel | |
| parent | 66be62ee5d64b6ad1285978644798d8611add931 (diff) | |
floppy: return the drive state flags from the 32-bit FDGETDRVSTAT
compat_getdrvstat() copies every field of the drive state to a 32-bit
caller except ->flags, which stays zero. 32-bit FDGETDRVSTAT and
FDPOLLDRVSTAT therefore never report FD_DISK_WRITABLE, FD_DISK_CHANGED
or FD_VERIFY: i386 fdutils (floppycontrol -P, fdmount), and other
32-bit users see every disk as write-protected and never see a disk
change. The compat code in block/compat_ioctl.c copied the field;
it was lost when that code moved into floppy.c
Also declare the field as compat_ulong_t: the 32-bit struct
floppy_drive_struct starts with an unsigned long, and a signed char at
offset 0 only lines up with its low byte on little-endian machines. The
size and offsets of the compat structure, and so FDGETDRVSTAT32, do not
change.
Cc: stable@vger.kernel.org
Fixes: 229b53c9bf4e ("take floppy compat ioctls to sodding floppy.c")
Link: https://patch.msgid.link/20260924112825.3525931-1-efremov@linux.com
Signed-off-by: Denis Efremov (Oracle) <efremov@linux.com>
Diffstat (limited to 'rust/kernel')
0 files changed, 0 insertions, 0 deletions
