summaryrefslogtreecommitdiffstats
path: root/drivers/tc
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-04-21 13:18:35 +0300
committerJens Axboe <axboe@kernel.dk>2021-04-21 09:15:25 -0600
commit1ffec389a6431782a8a28805830b6fae9bf00af1 (patch)
tree5eb749bdeb0c889294504c4232ea0977d0f9966b /drivers/tc
parent6327c911aa69bdf0c5f21a44970eab6dba213dde (diff)
downloadlinux-1ffec389a6431782a8a28805830b6fae9bf00af1.tar.bz2
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 'drivers/tc')
0 files changed, 0 insertions, 0 deletions