]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: check q->poll_stat in queue_poll_stat_show
authorMing Lei <ming.lei@redhat.com>
Thu, 2 Dec 2021 09:07:16 +0000 (17:07 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 2 Dec 2021 15:20:49 +0000 (08:20 -0700)
commit3a455e524b904e8d619cb3a6bd2de9181c9f496b
tree05c4db7fc4b7b64cdda8eaca0ecf447afe13e97d
parente646f839547a577e1bd9c92ad5df279c57fc0fde
blk-mq: check q->poll_stat in queue_poll_stat_show

Without checking q->poll_stat in queue_poll_stat_show(), kernel panic
may be caused if q->poll_stat isn't allocated.

Fixes: 9126304445c6 ("block: only allocate poll_stats if there's a user of them")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20211202090716.3292244-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-debugfs.c