diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-11-06 18:53:53 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-11-11 03:55:57 +0100 |
commit | f0fba398fec65ff5a2e1bf8ae62718ec0450abaf (patch) | |
tree | 6bfdf6ba484c60c1223ee24ef04f426480cc71c9 /block/blk-mq-sched.c | |
parent | fs: guard_bio_eod() needs to consider partitions (diff) | |
download | linux-f0fba398fec65ff5a2e1bf8ae62718ec0450abaf.tar.xz linux-f0fba398fec65ff5a2e1bf8ae62718ec0450abaf.zip |
block: avoid null pointer dereference on null disk
It is possible that the pointer disk can be null and hence
we can get a null pointer deference when accessing disk->flags.
Add a null pointer check to avoid the dereference.
Detected by CoverityScan, CID#1461133 ("Explicit null dereferenced")
Fixes: 8ddcd653257c ("block: introduce GENHD_FL_HIDDEN")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq-sched.c')
0 files changed, 0 insertions, 0 deletions