blk-mq-debugfs: Off by one in blk_mq_rq_state_name()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 20 Jun 2018 10:45:05 +0000 (13:45 +0300)
committerJens Axboe <axboe@kernel.dk>
Wed, 20 Jun 2018 17:26:04 +0000 (11:26 -0600)
commita1e79188628580465ac6d7a93a313336ee3364f1
treec77e8c6c014a97674114c779134b82bdba497ece
parent9c24c10a2c1e1bb478b6bb70612d9e885aee044f
blk-mq-debugfs: Off by one in blk_mq_rq_state_name()

If rq_state == ARRAY_SIZE() then we read one element beyond the end of
the blk_mq_rq_state_name_array[] array.

Fixes: ec6dcf63c55c ("blk-mq-debugfs: Show more request state information")
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-debugfs.c