]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
blk-mq: avoid setting hctx->tags->cpumask before allocation
authorAkinobu Mita <akinobu.mita@gmail.com>
Sat, 26 Sep 2015 17:09:19 +0000 (02:09 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Oct 2015 21:49:35 +0000 (14:49 -0700)
commit5781175fab1a2c8b0339644fb27d64bf24c9fda4
tree11a7d16e69087e1d20573bc7de520978d0e5f80c
parent4e9415aadba0f966ac40b071695149b5e1a7aaa9
blk-mq: avoid setting hctx->tags->cpumask before allocation

commit 1356aae08338f1c19ce1c67bf8c543a267688fc3 upstream.

When unmapped hw queue is remapped after CPU topology is changed,
hctx->tags->cpumask has to be set after hctx->tags is setup in
blk_mq_map_swqueue(), otherwise it causes null pointer dereference.

Fixes: f26cdc8536 ("blk-mq: Shared tag enhancements")
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Ming Lei <tom.leiming@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/blk-mq.c