浏览代码

blk-mq: fix potential oops on out-of-memory in __blk_mq_alloc_rq_maps()

__blk_mq_alloc_rq_maps() can be invoked multiple times, if we scale
back the queue depth if we are low on memory. So don't clear
set->tags when we fail, this is handled directly in
the parent function, blk_mq_alloc_tag_set().

Reported-by: Robert Elliott  <Elliott@hp.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe 11 年之前
父节点
当前提交
6b55e1f2d0
共有 1 个文件被更改,包括 0 次插入1 次删除
  1. 0 1
      block/blk-mq.c

+ 0 - 1
block/blk-mq.c

@@ -1959,7 +1959,6 @@ out_unwind:
 	while (--i >= 0)
 		blk_mq_free_rq_map(set, set->tags[i], i);
 
-	set->tags = NULL;
 	return -ENOMEM;
 }