From: Yunjian Wang Date: Thu, 1 Apr 2021 04:52:48 +0000 (+0800) Subject: net: cls_api: Fix uninitialised struct field bo->unlocked_driver_cb X-Git-Tag: v5.10.79~5702 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af36da5becfbd7003b7ce0cd3a346d92c95f8278;p=platform%2Fkernel%2Flinux-rpi.git net: cls_api: Fix uninitialised struct field bo->unlocked_driver_cb [ Upstream commit 990b03b05b2fba79de2a1ee9dc359fc552d95ba6 ] The 'unlocked_driver_cb' struct field in 'bo' is not being initialized in tcf_block_offload_init(). The uninitialized 'unlocked_driver_cb' will be used when calling unlocked_driver_cb(). So initialize 'bo' to zero to avoid the issue. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 0fdcf78d5973 ("net: use flow_indr_dev_setup_offload()") Signed-off-by: Yunjian Wang Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index d48ba4dee9a5..9383dc29ead5 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -646,7 +646,7 @@ static void tc_block_indr_cleanup(struct flow_block_cb *block_cb) struct net_device *dev = block_cb->indr.dev; struct Qdisc *sch = block_cb->indr.sch; struct netlink_ext_ack extack = {}; - struct flow_block_offload bo; + struct flow_block_offload bo = {}; tcf_block_offload_init(&bo, dev, sch, FLOW_BLOCK_UNBIND, block_cb->indr.binder_type,