OSDN Git Service

blk-iocost: read 'ioc->params' inside 'ioc->lock' in ioc_timer_fn()
authorYu Kuai <yukuai3@huawei.com>
Wed, 12 Oct 2022 09:40:35 +0000 (17:40 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 24 Oct 2022 00:59:17 +0000 (18:59 -0600)
commit074501bce3c5b4200a94b9937d189b3e3e2dbc98
tree0166f39315e18b1597cf7c881235c504b7c32305
parent2b2da2f6dc80e1299586f7e046a071809d5dee7f
blk-iocost: read 'ioc->params' inside 'ioc->lock' in ioc_timer_fn()

'ioc->params' is updated in ioc_refresh_params(), which is proteced by
'ioc->lock', however, ioc_timer_fn() read params outside the lock.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20221012094035.390056-5-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-iocost.c