Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
floppy: fix use-after-free in module load failure path
Commit 4882118 ("floppy: switch to one queue per drive instead of sharing a queue") introduced a use-after-free. We do "put_disk()" on the disk device _before_ we then clean up the queue associated with that disk. Move the put_disk() down to avoid dereferencing a free'd data structure. Cc: Jens Axboe <[email protected]> Cc: Vivek Goyal <[email protected]> Reported-and-tested-by: Randy Dunlap <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information