From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-review:Joel-Fernandes-Google/Remove-GP_REPLAY-state-from-rcu_sync/20191005-024257 101/102] net//sched/act_sample.c:105:2: error: implicit declaration of function 'rcu_swap_protected'; did you mean 'tc_skb_protocol'?
Date: Sat, 05 Oct 2019 04:53:20 +0800 [thread overview]
Message-ID: <201910050440.fSuStUlK%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 8686 bytes --]
tree: https://github.com/0day-ci/linux/commits/Joel-Fernandes-Google/Remove-GP_REPLAY-state-from-rcu_sync/20191005-024257
head: 6d1a4c2dfe7bb0c747dc03ba7c3101cbd29518bd
commit: d054bb769843a4fa1e6b1db084869b2be4d8f49c [101/102] rcu: Remove rcu_swap_protected()
config: x86_64-rhel-7.6 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
git checkout d054bb769843a4fa1e6b1db084869b2be4d8f49c
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.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 'tc_skb_protocol'? [-Werror=implicit-function-declaration]
rcu_swap_protected(s->psample_group, psample_group,
^~~~~~~~~~~~~~~~~~
tc_skb_protocol
net//sched/act_sample.c:106:7: error: implicit declaration of function 'lockdep_is_held'; did you mean 'lockdep_rtnl_is_held'? [-Werror=implicit-function-declaration]
lockdep_is_held(&s->tcf_lock));
^~~~~~~~~~~~~~~
lockdep_rtnl_is_held
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@mellanox.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 48317 bytes --]
reply other threads:[~2019-10-04 20:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201910050440.fSuStUlK%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.