CC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: Simon Horman <[email protected]> TO: [email protected] CC: Cong Wang <[email protected]> CC: Ido Schimmel <[email protected]> CC: Jamal Hadi Salim <[email protected]> CC: Jiri Pirko <[email protected]> CC: Oz Shlomo <[email protected]> CC: Roi Dayan <[email protected]> CC: Vlad Buslov <[email protected]> CC: Baowen Zheng <[email protected]> CC: Louis Peens <[email protected]>
Hi Simon, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Simon-Horman/allow-user-to-offload-tc-action-to-net-device/20211203-202602 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 43332cf97425a3e5508c827c82201ecc5ddd54e0 :::::: branch date: 4 days ago :::::: commit date: 4 days ago config: i386-randconfig-m021-20211203 (https://download.01.org/0day-ci/archive/20211207/[email protected]/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> New smatch warnings: net/sched/act_api.c:946 tcf_register_action() error: we previously assumed 'ops->id' could be null (see line 926) Old smatch warnings: net/sched/act_api.c:1362 tcf_action_init_1() error: uninitialized symbol 'a'. net/sched/act_api.c:1365 tcf_action_init_1() error: potentially dereferencing uninitialized 'a'. net/sched/act_api.c:1367 tcf_action_init_1() error: uninitialized symbol 'a'. net/sched/act_api.c:1611 tcf_action_get_1() error: uninitialized symbol 'a'. vim +946 net/sched/act_api.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 908 ddf97ccdd7cb7e WANG Cong 2016-02-22 909 int tcf_register_action(struct tc_action_ops *act, ddf97ccdd7cb7e WANG Cong 2016-02-22 910 struct pernet_operations *ops) ^1da177e4c3f41 Linus Torvalds 2005-04-16 911 { 1f747c26c48bb2 WANG Cong 2013-12-15 912 struct tc_action_ops *a; ddf97ccdd7cb7e WANG Cong 2016-02-22 913 int ret; ^1da177e4c3f41 Linus Torvalds 2005-04-16 914 ddf97ccdd7cb7e WANG Cong 2016-02-22 915 if (!act->act || !act->dump || !act->init || !act->walk || !act->lookup) 76c82d7a3d24a4 Jamal Hadi Salim 2013-12-04 916 return -EINVAL; 76c82d7a3d24a4 Jamal Hadi Salim 2013-12-04 917 ab102b80cef28c WANG Cong 2016-10-11 918 /* We have to register pernet ops before making the action ops visible, ab102b80cef28c WANG Cong 2016-10-11 919 * otherwise tcf_action_init_1() could get a partially initialized ab102b80cef28c WANG Cong 2016-10-11 920 * netns. ab102b80cef28c WANG Cong 2016-10-11 921 */ ab102b80cef28c WANG Cong 2016-10-11 922 ret = register_pernet_subsys(ops); ab102b80cef28c WANG Cong 2016-10-11 923 if (ret) ab102b80cef28c WANG Cong 2016-10-11 924 return ret; ab102b80cef28c WANG Cong 2016-10-11 925 d99abedd4989e7 Baowen Zheng 2021-12-03 @926 if (ops->id) { d99abedd4989e7 Baowen Zheng 2021-12-03 927 ret = tcf_pernet_add_id_list(*ops->id); d99abedd4989e7 Baowen Zheng 2021-12-03 928 if (ret) d99abedd4989e7 Baowen Zheng 2021-12-03 929 goto err_id; d99abedd4989e7 Baowen Zheng 2021-12-03 930 } d99abedd4989e7 Baowen Zheng 2021-12-03 931 ^1da177e4c3f41 Linus Torvalds 2005-04-16 932 write_lock(&act_mod_lock); 1f747c26c48bb2 WANG Cong 2013-12-15 933 list_for_each_entry(a, &act_base, head) { eddd2cf195d6fb Eli Cohen 2019-02-10 934 if (act->id == a->id || (strcmp(act->kind, a->kind) == 0)) { d99abedd4989e7 Baowen Zheng 2021-12-03 935 ret = -EEXIST; d99abedd4989e7 Baowen Zheng 2021-12-03 936 goto err_out; ^1da177e4c3f41 Linus Torvalds 2005-04-16 937 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 938 } 1f747c26c48bb2 WANG Cong 2013-12-15 939 list_add_tail(&act->head, &act_base); ^1da177e4c3f41 Linus Torvalds 2005-04-16 940 write_unlock(&act_mod_lock); ddf97ccdd7cb7e WANG Cong 2016-02-22 941 ^1da177e4c3f41 Linus Torvalds 2005-04-16 942 return 0; d99abedd4989e7 Baowen Zheng 2021-12-03 943 d99abedd4989e7 Baowen Zheng 2021-12-03 944 err_out: d99abedd4989e7 Baowen Zheng 2021-12-03 945 write_unlock(&act_mod_lock); d99abedd4989e7 Baowen Zheng 2021-12-03 @946 tcf_pernet_del_id_list(*ops->id); d99abedd4989e7 Baowen Zheng 2021-12-03 947 err_id: d99abedd4989e7 Baowen Zheng 2021-12-03 948 unregister_pernet_subsys(ops); d99abedd4989e7 Baowen Zheng 2021-12-03 949 return ret; ^1da177e4c3f41 Linus Torvalds 2005-04-16 950 } 62e3ba1b558e5f Patrick McHardy 2008-01-22 951 EXPORT_SYMBOL(tcf_register_action); ^1da177e4c3f41 Linus Torvalds 2005-04-16 952 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected] _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
