Commit 990b03b0 authored by Yunjian Wang's avatar Yunjian Wang Committed by David S. Miller

net: cls_api: Fix uninitialised struct field bo->unlocked_driver_cb

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: 0fdcf78d ("net: use flow_indr_dev_setup_offload()")
Signed-off-by: default avatarYunjian Wang <wangyunjian@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 29684d80
...@@ -646,7 +646,7 @@ static void tc_block_indr_cleanup(struct flow_block_cb *block_cb) ...@@ -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 net_device *dev = block_cb->indr.dev;
struct Qdisc *sch = block_cb->indr.sch; struct Qdisc *sch = block_cb->indr.sch;
struct netlink_ext_ack extack = {}; 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, tcf_block_offload_init(&bo, dev, sch, FLOW_BLOCK_UNBIND,
block_cb->indr.binder_type, block_cb->indr.binder_type,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment