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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Apr 2021 06:42:10 +0000 (08:42 +0200)
commitaf36da5becfbd7003b7ce0cd3a346d92c95f8278
tree4cd1f8fc26f7f3bd4394aff1b0082e813561d91c
parentffd5f1e87c1543f67f8c70d7f9f530b68ccf78d0
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 <wangyunjian@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sched/cls_api.c