summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2016-02-18 14:56:35 -0700
committerJens Axboe <axboe@fb.com>2016-03-03 14:46:04 -0700
commite9137d4b93078b6a9965acfb18a2a2ad91cf8405 (patch)
tree0633fc205e9f520315c268a3ca165866cc9421fc /block
parent66841672161efb9e3be4a1dbd9755020bb1d86b7 (diff)
downloadop-kernel-dev-e9137d4b93078b6a9965acfb18a2a2ad91cf8405.zip
op-kernel-dev-e9137d4b93078b6a9965acfb18a2a2ad91cf8405.tar.gz
blk-mq: Fix NULL pointer updating nr_requests
A h/w context's tags are freed if it was not assigned a CPU. Check if the context has tags before updating the depth. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block')
-rw-r--r--block/blk-mq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index f539a53..5667f59 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2336,6 +2336,8 @@ int blk_mq_update_nr_requests(struct request_queue *q, unsigned int nr)
ret = 0;
queue_for_each_hw_ctx(q, hctx, i) {
+ if (!hctx->tags)
+ continue;
ret = blk_mq_tag_update_depth(hctx->tags, nr);
if (ret)
break;
OpenPOWER on IntegriCloud