summaryrefslogtreecommitdiffstats
path: root/block/blk-mq-debugfs.h
diff options
context:
space:
mode:
authorJiufei Xue <jiufei.xjf@alibaba-inc.com>2017-10-10 05:13:32 +0200
committerJens Axboe <axboe@kernel.dk>2017-10-10 21:09:34 +0200
commit53cfdc10a95d03fbc82970d682a32696d19ef886 (patch)
tree1cd5d88450b9e3f6b741f3552348555b64376804 /block/blk-mq-debugfs.h
parentblkcg: check pol->cpd_free_fn before free cpd (diff)
downloadlinux-53cfdc10a95d03fbc82970d682a32696d19ef886.tar.xz
linux-53cfdc10a95d03fbc82970d682a32696d19ef886.zip
blk-throttle: fix null pointer dereference while throttling writeback IOs
A null pointer dereference can occur when blkcg is removed manually with writeback IOs inflight. This is caused by the following case: Writeback kworker submit the bio and set bio->bi_cg_private to tg in blk_throtl_assoc_bio. Then we remove the block cgroup manually, the blkg and tg would be freed if there is no request inflight. When the submitted bio come back, blk_throtl_bio_endio() fetch the tg which was already freed. Fix this by increasing the refcount of blkg in funcion blk_throtl_assoc_bio() so that the blkg will not be freed until the bio_endio called. Reviewed-by: Shaohua Li <shli@fb.com> Signed-off-by: Jiufei Xue <jiufei.xjf@alibaba-inc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq-debugfs.h')
0 files changed, 0 insertions, 0 deletions