summaryrefslogtreecommitdiffstats
path: root/block/t10-pi.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2015-09-26 19:09:21 +0200
committerJens Axboe <axboe@fb.com>2015-09-29 19:32:46 +0200
commita723bab3d7529133f71fc8a5e96f86e3639a0d13 (patch)
tree658d5b5c71b7851f34ed07ce8c0022915acd33e4 /block/t10-pi.c
parentblk-mq: fix sysfs registration/unregistration race (diff)
downloadlinux-a723bab3d7529133f71fc8a5e96f86e3639a0d13.tar.xz
linux-a723bab3d7529133f71fc8a5e96f86e3639a0d13.zip
blk-mq: Fix use after of free q->mq_map
CPU hotplug handling for blk-mq (blk_mq_queue_reinit) updates q->mq_map by blk_mq_update_queue_map() for all request queues in all_q_list. On the other hand, q->mq_map is released before deleting the queue from all_q_list. So if CPU hotplug event occurs in the window, invalid memory access can happen. Fix it by releasing q->mq_map in blk_mq_release() to make it happen latter than removal from all_q_list. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Suggested-by: Ming Lei <tom.leiming@gmail.com> Reviewed-by: Ming Lei <tom.leiming@gmail.com> Cc: Ming Lei <tom.leiming@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/t10-pi.c')
0 files changed, 0 insertions, 0 deletions