diff options
| author | Jens Axboe <axboe@kernel.dk> | 2026-10-05 09:59:24 -0600 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-10-05 09:59:24 -0600 |
| commit | b766aba70e16f4e4a4996fcf39ae2e59f11d65eb (patch) | |
| tree | 652484bfa1decb43448cf1fcdd91622450f1818c /rust/kernel | |
| parent | 9690943353cec1690a715e000ba6a74e5139f530 (diff) | |
| parent | bb38473f1bcb287567f2fa7980e483a778092504 (diff) | |
Merge tag 'floppy-for-7.4' of https://github.com/evdenis/linux-floppy into for-7.4/block
Pull floppy fixes from Denis:
"Six fixes for long-standing floppy bugs, most of them found by syzbot
or by race detectors:
- Flush pending work before releasing the IRQ and DMA when no FDC is
found, from Karl Mehltretter. The work queued by the probe could run
after the IRQ and DMA were already freed ("work still pending").
- Unregister the platform device when add_disk() fails, from Guangshuo
Li. The failing drive's device stayed registered after the module was
unloaded, and reading its sysfs attributes oopsed on freed module
memory.
- Return early from reset_interrupt() when cont is already NULL, from
Yang Xiuwei. This fixes the syzbot GPF in reset_interrupt(). I
decided to take this v1 as a partial solution; the full fix will
require additional rework.
- Replace volatile on command_status with READ_ONCE()/WRITE_ONCE() and
annotate floppy_work_fn and current_type[], from Cen Zhang. No
functional change.
- Don't keep a pointer to a stack buffer in timeout_message.
show_floppy() printed it from the interrupt handler after
request_done() had returned (syzbot KASAN report).
- Copy the drive state flags in the 32-bit FDGETDRVSTAT and
FDPOLLDRVSTAT. Since 4.13 the compat path returned flags == 0, so
32-bit fdutils saw every disk as write-protected and never saw a disk
change.
Tested in QEMU with a floppy test suite (including the compat ioctls
from 32-bit userspace, and fdutils/mtools/dosfstools workflows) on
KASAN and KCSAN kernels, with no new warnings."
* tag 'floppy-for-7.4' of https://github.com/evdenis/linux-floppy:
floppy: return the drive state flags from the 32-bit FDGETDRVSTAT
floppy: don't store a stack buffer in timeout_message
floppy: annotate data-races around command_status and floppy_work_fn
floppy: unregister platform device on add_disk failure
floppy: avoid NULL deref in reset_interrupt when cont is cleared
floppy: flush pending work before releasing resources on init failure
Diffstat (limited to 'rust/kernel')
0 files changed, 0 insertions, 0 deletions
