diff options
author | 2021-04-21 13:18:35 +0300 | |
---|---|---|
committer | 2021-04-21 09:15:25 -0600 | |
commit | 1ffec389a6431782a8a28805830b6fae9bf00af1 (patch) | |
tree | 5eb749bdeb0c889294504c4232ea0977d0f9966b /tools/perf/scripts/python/export-to-sqlite.py | |
parent | drbd: Fix fall-through warnings for Clang (diff) | |
download | wireguard-linux-1ffec389a6431782a8a28805830b6fae9bf00af1.tar.xz wireguard-linux-1ffec389a6431782a8a28805830b6fae9bf00af1.zip |
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: bf9c0538e485 ("ataflop: use a separate gendisk for each media format")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions