[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201910060730.jTC7h6Mk%lkp@intel.com>
Date: Sun, 6 Oct 2019 07:09:33 +0800
From: kbuild test robot <lkp@...el.com>
To: "Paul E. McKenney" <paulmck@...nel.org>
Cc: kbuild-all@...org, linux-kernel@...r.kernel.org
Subject: [rcu:dev.2019.10.02a 24/24] net/sched/act_sample.c:105:2: error:
implicit declaration of function 'rcu_swap_protected'; did you mean
'_pcp_protect'?
tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2019.10.02a
head: 06250c65ccb8bd7cbaffe62ed0cc638c0f15b49c
commit: 06250c65ccb8bd7cbaffe62ed0cc638c0f15b49c [24/24] rcu: Remove rcu_swap_protected()
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 06250c65ccb8bd7cbaffe62ed0cc638c0f15b49c
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
net/sched/act_sample.c: In function 'tcf_sample_init':
>> net/sched/act_sample.c:105:2: error: implicit declaration of function 'rcu_swap_protected'; did you mean '_pcp_protect'? [-Werror=implicit-function-declaration]
rcu_swap_protected(s->psample_group, psample_group,
^~~~~~~~~~~~~~~~~~
_pcp_protect
cc1: some warnings being treated as errors
vim +105 net/sched/act_sample.c
5c5670fae43027 Yotam Gigi 2017-01-23 35
5c5670fae43027 Yotam Gigi 2017-01-23 36 static int tcf_sample_init(struct net *net, struct nlattr *nla,
5c5670fae43027 Yotam Gigi 2017-01-23 37 struct nlattr *est, struct tc_action **a, int ovr,
85d0966fa57e0e Davide Caratti 2019-03-20 38 int bind, bool rtnl_held, struct tcf_proto *tp,
789871bb2a0381 Vlad Buslov 2018-07-05 39 struct netlink_ext_ack *extack)
5c5670fae43027 Yotam Gigi 2017-01-23 40 {
5c5670fae43027 Yotam Gigi 2017-01-23 41 struct tc_action_net *tn = net_generic(net, sample_net_id);
5c5670fae43027 Yotam Gigi 2017-01-23 42 struct nlattr *tb[TCA_SAMPLE_MAX + 1];
5c5670fae43027 Yotam Gigi 2017-01-23 43 struct psample_group *psample_group;
7be8ef2cdbfe41 Dmytro Linkin 2019-08-01 44 u32 psample_group_num, rate, index;
e8c87c643ef360 Davide Caratti 2019-03-20 45 struct tcf_chain *goto_ch = NULL;
5c5670fae43027 Yotam Gigi 2017-01-23 46 struct tc_sample *parm;
5c5670fae43027 Yotam Gigi 2017-01-23 47 struct tcf_sample *s;
5c5670fae43027 Yotam Gigi 2017-01-23 48 bool exists = false;
0190c1d452a91c Vlad Buslov 2018-07-05 49 int ret, err;
5c5670fae43027 Yotam Gigi 2017-01-23 50
5c5670fae43027 Yotam Gigi 2017-01-23 51 if (!nla)
5c5670fae43027 Yotam Gigi 2017-01-23 52 return -EINVAL;
8cb081746c031f Johannes Berg 2019-04-26 53 ret = nla_parse_nested_deprecated(tb, TCA_SAMPLE_MAX, nla,
8cb081746c031f Johannes Berg 2019-04-26 54 sample_policy, NULL);
5c5670fae43027 Yotam Gigi 2017-01-23 55 if (ret < 0)
5c5670fae43027 Yotam Gigi 2017-01-23 56 return ret;
5c5670fae43027 Yotam Gigi 2017-01-23 57 if (!tb[TCA_SAMPLE_PARMS] || !tb[TCA_SAMPLE_RATE] ||
5c5670fae43027 Yotam Gigi 2017-01-23 58 !tb[TCA_SAMPLE_PSAMPLE_GROUP])
5c5670fae43027 Yotam Gigi 2017-01-23 59 return -EINVAL;
5c5670fae43027 Yotam Gigi 2017-01-23 60
5c5670fae43027 Yotam Gigi 2017-01-23 61 parm = nla_data(tb[TCA_SAMPLE_PARMS]);
7be8ef2cdbfe41 Dmytro Linkin 2019-08-01 62 index = parm->index;
7be8ef2cdbfe41 Dmytro Linkin 2019-08-01 63 err = tcf_idr_check_alloc(tn, &index, a, bind);
0190c1d452a91c Vlad Buslov 2018-07-05 64 if (err < 0)
0190c1d452a91c Vlad Buslov 2018-07-05 65 return err;
0190c1d452a91c Vlad Buslov 2018-07-05 66 exists = err;
5c5670fae43027 Yotam Gigi 2017-01-23 67 if (exists && bind)
5c5670fae43027 Yotam Gigi 2017-01-23 68 return 0;
5c5670fae43027 Yotam Gigi 2017-01-23 69
5c5670fae43027 Yotam Gigi 2017-01-23 70 if (!exists) {
7be8ef2cdbfe41 Dmytro Linkin 2019-08-01 71 ret = tcf_idr_create(tn, index, est, a,
34043d250f5136 Davide Caratti 2018-09-14 72 &act_sample_ops, bind, true);
0190c1d452a91c Vlad Buslov 2018-07-05 73 if (ret) {
7be8ef2cdbfe41 Dmytro Linkin 2019-08-01 74 tcf_idr_cleanup(tn, index);
5c5670fae43027 Yotam Gigi 2017-01-23 75 return ret;
0190c1d452a91c Vlad Buslov 2018-07-05 76 }
5c5670fae43027 Yotam Gigi 2017-01-23 77 ret = ACT_P_CREATED;
4e8ddd7f1758ca Vlad Buslov 2018-07-05 78 } else if (!ovr) {
65a206c01e8e7f Chris Mi 2017-08-30 79 tcf_idr_release(*a, bind);
5c5670fae43027 Yotam Gigi 2017-01-23 80 return -EEXIST;
5c5670fae43027 Yotam Gigi 2017-01-23 81 }
e8c87c643ef360 Davide Caratti 2019-03-20 82 err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack);
e8c87c643ef360 Davide Caratti 2019-03-20 83 if (err < 0)
e8c87c643ef360 Davide Caratti 2019-03-20 84 goto release_idr;
5c5670fae43027 Yotam Gigi 2017-01-23 85
fae2708174ae95 Davide Caratti 2019-04-04 86 rate = nla_get_u32(tb[TCA_SAMPLE_RATE]);
fae2708174ae95 Davide Caratti 2019-04-04 87 if (!rate) {
fae2708174ae95 Davide Caratti 2019-04-04 88 NL_SET_ERR_MSG(extack, "invalid sample rate");
fae2708174ae95 Davide Caratti 2019-04-04 89 err = -EINVAL;
fae2708174ae95 Davide Caratti 2019-04-04 90 goto put_chain;
fae2708174ae95 Davide Caratti 2019-04-04 91 }
653cd284a8a857 Vlad Buslov 2018-08-14 92 psample_group_num = nla_get_u32(tb[TCA_SAMPLE_PSAMPLE_GROUP]);
653cd284a8a857 Vlad Buslov 2018-08-14 93 psample_group = psample_group_get(net, psample_group_num);
cadb9c9fdbc6a6 Yotam Gigi 2017-01-31 94 if (!psample_group) {
e8c87c643ef360 Davide Caratti 2019-03-20 95 err = -ENOMEM;
e8c87c643ef360 Davide Caratti 2019-03-20 96 goto put_chain;
cadb9c9fdbc6a6 Yotam Gigi 2017-01-31 97 }
653cd284a8a857 Vlad Buslov 2018-08-14 98
653cd284a8a857 Vlad Buslov 2018-08-14 99 s = to_sample(*a);
653cd284a8a857 Vlad Buslov 2018-08-14 100
653cd284a8a857 Vlad Buslov 2018-08-14 101 spin_lock_bh(&s->tcf_lock);
e8c87c643ef360 Davide Caratti 2019-03-20 102 goto_ch = tcf_action_set_ctrlact(*a, parm->action, goto_ch);
fae2708174ae95 Davide Caratti 2019-04-04 103 s->rate = rate;
653cd284a8a857 Vlad Buslov 2018-08-14 104 s->psample_group_num = psample_group_num;
dbf47a2a094edf Vlad Buslov 2019-08-27 @105 rcu_swap_protected(s->psample_group, psample_group,
dbf47a2a094edf Vlad Buslov 2019-08-27 106 lockdep_is_held(&s->tcf_lock));
5c5670fae43027 Yotam Gigi 2017-01-23 107
5c5670fae43027 Yotam Gigi 2017-01-23 108 if (tb[TCA_SAMPLE_TRUNC_SIZE]) {
5c5670fae43027 Yotam Gigi 2017-01-23 109 s->truncate = true;
5c5670fae43027 Yotam Gigi 2017-01-23 110 s->trunc_size = nla_get_u32(tb[TCA_SAMPLE_TRUNC_SIZE]);
5c5670fae43027 Yotam Gigi 2017-01-23 111 }
653cd284a8a857 Vlad Buslov 2018-08-14 112 spin_unlock_bh(&s->tcf_lock);
dbf47a2a094edf Vlad Buslov 2019-08-27 113
dbf47a2a094edf Vlad Buslov 2019-08-27 114 if (psample_group)
dbf47a2a094edf Vlad Buslov 2019-08-27 115 psample_group_put(psample_group);
e8c87c643ef360 Davide Caratti 2019-03-20 116 if (goto_ch)
e8c87c643ef360 Davide Caratti 2019-03-20 117 tcf_chain_put_by_act(goto_ch);
5c5670fae43027 Yotam Gigi 2017-01-23 118
5c5670fae43027 Yotam Gigi 2017-01-23 119 if (ret == ACT_P_CREATED)
65a206c01e8e7f Chris Mi 2017-08-30 120 tcf_idr_insert(tn, *a);
5c5670fae43027 Yotam Gigi 2017-01-23 121 return ret;
e8c87c643ef360 Davide Caratti 2019-03-20 122 put_chain:
e8c87c643ef360 Davide Caratti 2019-03-20 123 if (goto_ch)
e8c87c643ef360 Davide Caratti 2019-03-20 124 tcf_chain_put_by_act(goto_ch);
e8c87c643ef360 Davide Caratti 2019-03-20 125 release_idr:
e8c87c643ef360 Davide Caratti 2019-03-20 126 tcf_idr_release(*a, bind);
e8c87c643ef360 Davide Caratti 2019-03-20 127 return err;
5c5670fae43027 Yotam Gigi 2017-01-23 128 }
5c5670fae43027 Yotam Gigi 2017-01-23 129
:::::: The code at line 105 was first introduced by commit
:::::: dbf47a2a094edf58983265e323ca4bdcdb58b5ee net: sched: act_sample: fix psample group handling on overwrite
:::::: TO: Vlad Buslov <vladbu@...lanox.com>
:::::: CC: David S. Miller <davem@...emloft.net>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (67225 bytes)
Powered by blists - more mailing lists