Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ataflop: potential out of bounds in do_format()
The function uses "type" as an array index: q = unit[drive].disk[type]->queue; Unfortunately the bounds check on "type" isn't done until later in the function. Fix this by moving the bounds check to the start. Fixes: bf9c053 ("ataflop: use a separate gendisk for each media format") Reported-by: kernel test robot <[email protected]> Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information