]> 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)
commitf63dc0613081ac7b05348943889282a61baf0612
tree09ffe77a9bc7e46bd7c34032be61e92a1d493404
parent76cc526c0b5104387698f14764bc78d466e81287
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: 3060b9a6d85f ("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