From: kbuild test robot <lkp@intel.com>
To: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: kbuild-all@01.org, dsahern@gmail.com, netdev@vger.kernel.org,
davem@davemloft.net, Nicolas Dichtel <nicolas.dichtel@6wind.com>
Subject: Re: [PATCH net-next v3 5/5] netns: enable to dump full nsid translation table
Date: Mon, 26 Nov 2018 18:06:14 +0800 [thread overview]
Message-ID: <201811261813.z7z4h9RS%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181122222215.23554-6-nicolas.dichtel@6wind.com>
[-- Attachment #1: Type: text/plain, Size: 4062 bytes --]
Hi Nicolas,
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/Nicolas-Dichtel/netns-remove-net-arg-from-rtnl_net_fill/20181126-035032
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
>> net/core/net_namespace.c:963:23: warning: context imbalance in 'rtnl_net_dumpid' - different lock contexts for basic block
vim +/rtnl_net_dumpid +963 net/core/net_namespace.c
5589651eb Nicolas Dichtel 2018-11-22 929
a143c40c3 Nicolas Dichtel 2015-04-07 930 static int rtnl_net_dumpid(struct sk_buff *skb, struct netlink_callback *cb)
a143c40c3 Nicolas Dichtel 2015-04-07 931 {
a143c40c3 Nicolas Dichtel 2015-04-07 932 struct rtnl_net_dump_cb net_cb = {
5589651eb Nicolas Dichtel 2018-11-22 933 .tgt_net = sock_net(skb->sk),
a143c40c3 Nicolas Dichtel 2015-04-07 934 .skb = skb,
70955fc94 Nicolas Dichtel 2018-11-22 935 .fillargs = {
70955fc94 Nicolas Dichtel 2018-11-22 936 .portid = NETLINK_CB(cb->skb).portid,
70955fc94 Nicolas Dichtel 2018-11-22 937 .seq = cb->nlh->nlmsg_seq,
70955fc94 Nicolas Dichtel 2018-11-22 938 .flags = NLM_F_MULTI,
70955fc94 Nicolas Dichtel 2018-11-22 939 .cmd = RTM_NEWNSID,
70955fc94 Nicolas Dichtel 2018-11-22 940 },
a143c40c3 Nicolas Dichtel 2015-04-07 941 .idx = 0,
a143c40c3 Nicolas Dichtel 2015-04-07 942 .s_idx = cb->args[0],
a143c40c3 Nicolas Dichtel 2015-04-07 943 };
5589651eb Nicolas Dichtel 2018-11-22 944 int err = 0;
a143c40c3 Nicolas Dichtel 2015-04-07 945
5589651eb Nicolas Dichtel 2018-11-22 946 if (cb->strict_check) {
5589651eb Nicolas Dichtel 2018-11-22 947 err = rtnl_valid_dump_net_req(cb->nlh, skb->sk, &net_cb, cb);
5589651eb Nicolas Dichtel 2018-11-22 948 if (err < 0)
5589651eb Nicolas Dichtel 2018-11-22 949 goto end;
f80f14c36 David Ahern 2018-10-07 950 }
f80f14c36 David Ahern 2018-10-07 951
5589651eb Nicolas Dichtel 2018-11-22 952 spin_lock_bh(&net_cb.tgt_net->nsid_lock);
8a46e1ccc Nicolas Dichtel 2018-11-22 953 if (net_cb.fillargs.add_ref &&
8a46e1ccc Nicolas Dichtel 2018-11-22 954 !net_eq(net_cb.ref_net, net_cb.tgt_net) &&
8a46e1ccc Nicolas Dichtel 2018-11-22 955 !spin_trylock_bh(&net_cb.ref_net->nsid_lock)) {
8a46e1ccc Nicolas Dichtel 2018-11-22 956 err = -EAGAIN;
8a46e1ccc Nicolas Dichtel 2018-11-22 957 goto end;
8a46e1ccc Nicolas Dichtel 2018-11-22 958 }
5589651eb Nicolas Dichtel 2018-11-22 959 idr_for_each(&net_cb.tgt_net->netns_ids, rtnl_net_dumpid_one, &net_cb);
8a46e1ccc Nicolas Dichtel 2018-11-22 960 if (net_cb.fillargs.add_ref &&
8a46e1ccc Nicolas Dichtel 2018-11-22 961 !net_eq(net_cb.ref_net, net_cb.tgt_net))
8a46e1ccc Nicolas Dichtel 2018-11-22 962 spin_unlock_bh(&net_cb.ref_net->nsid_lock);
5589651eb Nicolas Dichtel 2018-11-22 @963 spin_unlock_bh(&net_cb.tgt_net->nsid_lock);
a143c40c3 Nicolas Dichtel 2015-04-07 964
a143c40c3 Nicolas Dichtel 2015-04-07 965 cb->args[0] = net_cb.idx;
5589651eb Nicolas Dichtel 2018-11-22 966 end:
8a46e1ccc Nicolas Dichtel 2018-11-22 967 if (net_cb.fillargs.add_ref)
5589651eb Nicolas Dichtel 2018-11-22 968 put_net(net_cb.tgt_net);
5589651eb Nicolas Dichtel 2018-11-22 969 return err < 0 ? err : skb->len;
a143c40c3 Nicolas Dichtel 2015-04-07 970 }
a143c40c3 Nicolas Dichtel 2015-04-07 971
:::::: The code at line 963 was first introduced by commit
:::::: 5589651eb5e06b32107a1d8830af4be67aa58b85 netns: add support of NETNSA_TARGET_NSID
:::::: TO: Nicolas Dichtel <nicolas.dichtel@6wind.com>
:::::: CC: 0day robot <lkp@intel.com>
---
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: 66610 bytes --]
next prev parent reply other threads:[~2018-11-26 21:00 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-21 11:01 [PATCH net-next 0/4] Ease to interpret net-nsid Nicolas Dichtel
2018-11-21 11:01 ` [PATCH net-next 1/4] netns: remove net arg from rtnl_net_fill() Nicolas Dichtel
2018-11-21 11:01 ` [PATCH net-next 2/4] netns: add support of NETNSA_TARGET_NSID Nicolas Dichtel
2018-11-21 18:05 ` David Ahern
2018-11-21 20:58 ` Nicolas Dichtel
2018-11-21 21:07 ` David Ahern
2018-11-22 8:06 ` Nicolas Dichtel
2018-11-21 11:01 ` [PATCH net-next 3/4] netns: enable to specify a nsid for a get request Nicolas Dichtel
2018-11-21 11:01 ` [PATCH net-next 4/4] netns: enable to dump full nsid translation table Nicolas Dichtel
2018-11-21 18:09 ` David Ahern
2018-11-21 21:01 ` Nicolas Dichtel
2018-11-21 21:08 ` David Ahern
2018-11-22 15:50 ` [PATCH net-next v2 0/5] Ease to interpret net-nsid Nicolas Dichtel
2018-11-22 15:50 ` [PATCH net-next v2 1/5] netns: remove net arg from rtnl_net_fill() Nicolas Dichtel
2018-11-22 16:18 ` David Ahern
2018-11-22 15:50 ` [PATCH net-next v2 2/5] netns: introduce 'struct net_fill_args' Nicolas Dichtel
2018-11-22 16:23 ` David Ahern
2018-11-22 15:50 ` [PATCH net-next v2 3/5] netns: add support of NETNSA_TARGET_NSID Nicolas Dichtel
2018-11-22 16:32 ` David Ahern
2018-11-22 15:50 ` [PATCH net-next v2 4/5] netns: enable to specify a nsid for a get request Nicolas Dichtel
2018-11-22 16:32 ` David Ahern
2018-11-22 15:50 ` [PATCH net-next v2 5/5] netns: enable to dump full nsid translation table Nicolas Dichtel
2018-11-22 16:40 ` David Ahern
2018-11-22 16:42 ` Nicolas Dichtel
2018-11-22 22:22 ` [PATCH net-next v3 0/5] Ease to interpret net-nsid Nicolas Dichtel
2018-11-22 22:22 ` [PATCH net-next v3 1/5] netns: remove net arg from rtnl_net_fill() Nicolas Dichtel
2018-11-22 22:22 ` [PATCH net-next v3 2/5] netns: introduce 'struct net_fill_args' Nicolas Dichtel
2018-11-22 22:22 ` [PATCH net-next v3 3/5] netns: add support of NETNSA_TARGET_NSID Nicolas Dichtel
2018-11-22 22:22 ` [PATCH net-next v3 4/5] netns: enable to specify a nsid for a get request Nicolas Dichtel
2018-11-22 22:22 ` [PATCH net-next v3 5/5] netns: enable to dump full nsid translation table Nicolas Dichtel
2018-11-24 15:47 ` David Ahern
2018-11-26 10:06 ` kbuild test robot [this message]
2018-11-26 14:42 ` [PATCH net-next v4 0/5] Ease to interpret net-nsid Nicolas Dichtel
2018-11-26 14:42 ` [PATCH net-next v4 1/5] netns: remove net arg from rtnl_net_fill() Nicolas Dichtel
2018-11-26 14:42 ` [PATCH net-next v4 2/5] netns: introduce 'struct net_fill_args' Nicolas Dichtel
2018-11-26 14:42 ` [PATCH net-next v4 3/5] netns: add support of NETNSA_TARGET_NSID Nicolas Dichtel
2018-11-26 14:42 ` [PATCH net-next v4 4/5] netns: enable to specify a nsid for a get request Nicolas Dichtel
2018-11-26 14:42 ` [PATCH net-next v4 5/5] netns: enable to dump full nsid translation table Nicolas Dichtel
2018-11-28 0:20 ` [PATCH net-next v4 0/5] Ease to interpret net-nsid David Miller
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=201811261813.z7z4h9RS%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=kbuild-all@01.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
/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.