]> git.baikalelectronics.ru Git - kernel.git/commit
net: cls_api: Fix uninitialised struct field bo->unlocked_driver_cb
authorYunjian Wang <wangyunjian@huawei.com>
Thu, 1 Apr 2021 04:52:48 +0000 (12:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Apr 2021 21:14:22 +0000 (14:14 -0700)
commit990b03b05b2fba79de2a1ee9dc359fc552d95ba6
tree09ffe77a9bc7e46bd7c34032be61e92a1d493404
parent29684d802e4ab484c679859217c1588c199f1d4f
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: 0fdcf78d5973 ("net: use flow_indr_dev_setup_offload()")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_api.c