rq-qos: use a mb for got_token
mainline inclusion from mainline-5.3-rc2 commit ac38297f7038cd5b80d66f8809c7bbf5b70031f3 category: bugfix bugzilla: 21211 CVE: NA --------------------------- Oleg noticed that our checking of data.got_token is unsafe in the cleanup case, and should really use a memory barrier. Use a wmb on the write side, and a rmb() on the read side. We don't need one in the main loop since we're saved by set_current_state(). Reviewed-by: NOleg Nesterov <oleg@redhat.com> Signed-off-by: NJosef Bacik <josef@toxicpanda.com> Signed-off-by: NJens Axboe <axboe@kernel.dk> Conflicts: block/blk-rq-qos.c [yan: the code was in __wbt_wait() and wbt_wake_function()] Signed-off-by: NJason Yan <yanaijie@huawei.com> Reviewed-by: NYufen Yu <yuyufen@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录