
From: Yu Kuai <yukuai3@huawei.com> hulk inclusion category: bugfix bugzilla: 182133 CVE: NA ------------------------------------------------- After introducing kyber_depth_updated(), the intialization of 'async_depth' is moved from kyber_init_sched() to kyber_init_hctx(), which leave a window for user to read uninitilized 'async_depth' through debugfs. Thus initialize 'async_depth' to zero in kyber_queue_data_alloc() to fix the problem. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Reviewed-by: Hou Tao <houtao1@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- block/kyber-iosched.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/kyber-iosched.c b/block/kyber-iosched.c index 9eeb60d97f0ca..d8f3cb1bffa61 100644 --- a/block/kyber-iosched.c +++ b/block/kyber-iosched.c @@ -333,6 +333,7 @@ static struct kyber_queue_data *kyber_queue_data_alloc(struct request_queue *q) kqd->read_lat_nsec = 2000000ULL; kqd->write_lat_nsec = 10000000ULL; + kqd->async_depth = 0; return kqd; -- 2.25.1