From: Weili Qian <qianweili@huawei.com> Several session alloc functions (agg, join_gather, udma) declared a local struct wd_sched_params without initialization, setting only alg_name and ctxs before passing to wd_sched_set_param, which reads pkt_size, data_mode and prio_mode unconditionally. Uninitialized stack values caused nondeterministic scheduling. Initialize with = {0} at declaration, consistent with wd_comp_alloc_sess. Signed-off-by: Weili Qian <qianweili@huawei.com> --- wd_agg.c | 2 +- wd_join_gather.c | 2 +- wd_udma.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wd_agg.c b/wd_agg.c index 951e03d..ed4ba74 100644 --- a/wd_agg.c +++ b/wd_agg.c @@ -446,7 +446,7 @@ static int wd_agg_uninit_sess_priv(struct wd_agg_sess *sess) handle_t wd_agg_alloc_sess(struct wd_agg_sess_setup *setup) { - struct wd_sched_params params; + struct wd_sched_params params = {0}; struct wd_agg_sess *sess; __u32 out_agg_cols_num = 0; int ret; diff --git a/wd_join_gather.c b/wd_join_gather.c index e43dbf9..27472d3 100644 --- a/wd_join_gather.c +++ b/wd_join_gather.c @@ -533,7 +533,7 @@ static int wd_join_gather_init_sess(struct wd_join_gather_sess *sess, handle_t wd_join_gather_alloc_sess(struct wd_join_gather_sess_setup *setup) { - struct wd_sched_params params; + struct wd_sched_params params = {0}; struct wd_join_gather_sess *sess; int ret; diff --git a/wd_udma.c b/wd_udma.c index e329838..b92e75b 100644 --- a/wd_udma.c +++ b/wd_udma.c @@ -78,7 +78,7 @@ void wd_udma_free_sess(handle_t sess) handle_t wd_udma_alloc_sess(struct wd_udma_sess_setup *setup) { - struct wd_sched_params params; + struct wd_sched_params params = {0}; struct wd_udma_sess *sess; int ret; -- 2.50.1.windows.1