From: Kirill Tkhai <ktkhai@virtuozzo.com>
To: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, davem@davemloft.net, yoshfuji@linux-ipv6.org,
edumazet@google.com, yanhaishuang@cmss.chinamobile.com,
nikolay@cumulusnetworks.com, yotamg@mellanox.com,
soheil@google.com, avagin@virtuozzo.com,
nicolas.dichtel@6wind.com, ebiederm@xmission.com, fw@strlen.de,
roman.kapl@sysgo.com, netdev@vger.kernel.org,
xiyou.wangcong@gmail.com, dvyukov@google.com,
andreyknvl@google.com
Subject: Re: [PATCH net-next 4/5] net: Make ip_ra_chain per struct net
Date: Sat, 17 Mar 2018 13:21:51 +0300 [thread overview]
Message-ID: <ffd75716-bbb5-6ccd-0333-77090f222b24@virtuozzo.com> (raw)
In-Reply-To: <201803170753.rO48WL2s%fengguang.wu@intel.com>
Hi,
On 17.03.2018 02:22, kbuild test robot wrote:
> Hi Kirill,
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on v4.16-rc4]
> [also build test WARNING on next-20180316]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Kirill-Tkhai/Rework-ip_ra_chain-protection/20180317-032841
> reproduce:
> # apt-get install sparse
> make ARCH=x86_64 allmodconfig
> make C=1 CF=-D__CHECK_ENDIAN__
>
>
> sparse warnings: (new ones prefixed by >>)
>
>>> net/ipv4/ip_input.c:162:19: sparse: incompatible types in comparison expression (different address spaces)
thanks for reporting this! Forgot to add __rcu modifier to member type.
I'll send v2 version.
Kirill
> --
>>> net/ipv4/ip_sockglue.c:347:18: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip_ra_chain [noderef] <asn:4>**rap @@ got n [noderef] <asn:4>**rap @@
> net/ipv4/ip_sockglue.c:347:18: expected struct ip_ra_chain [noderef] <asn:4>**rap
> net/ipv4/ip_sockglue.c:347:18: got struct ip_ra_chain **<noident>
>
> vim +162 net/ipv4/ip_input.c
>
> 150
> 151 /*
> 152 * Process Router Attention IP option (RFC 2113)
> 153 */
> 154 bool ip_call_ra_chain(struct sk_buff *skb)
> 155 {
> 156 struct ip_ra_chain *ra;
> 157 u8 protocol = ip_hdr(skb)->protocol;
> 158 struct sock *last = NULL;
> 159 struct net_device *dev = skb->dev;
> 160 struct net *net = dev_net(dev);
> 161
> > 162 for (ra = rcu_dereference(net->ipv4.ra_chain); ra; ra = rcu_dereference(ra->next)) {
> 163 struct sock *sk = ra->sk;
> 164
> 165 /* If socket is bound to an interface, only report
> 166 * the packet if it came from that interface.
> 167 */
> 168 if (sk && inet_sk(sk)->inet_num == protocol &&
> 169 (!sk->sk_bound_dev_if ||
> 170 sk->sk_bound_dev_if == dev->ifindex)) {
> 171 if (ip_is_fragment(ip_hdr(skb))) {
> 172 if (ip_defrag(net, skb, IP_DEFRAG_CALL_RA_CHAIN))
> 173 return true;
> 174 }
> 175 if (last) {
> 176 struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);
> 177 if (skb2)
> 178 raw_rcv(last, skb2);
> 179 }
> 180 last = sk;
> 181 }
> 182 }
> 183
> 184 if (last) {
> 185 raw_rcv(last, skb);
> 186 return true;
> 187 }
> 188 return false;
> 189 }
> 190
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
>
next prev parent reply other threads:[~2018-03-17 10:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-15 13:19 [PATCH net-next 0/5] Rework ip_ra_chain protection Kirill Tkhai
2018-03-15 13:20 ` [PATCH net-next 1/5] net: Revert "ipv4: get rid of ip_ra_lock" Kirill Tkhai
2018-03-15 13:20 ` [PATCH net-next 2/5] net: Revert "ipv4: fix a deadlock in ip_ra_control" Kirill Tkhai
2018-03-15 13:20 ` [PATCH net-next 3/5] net: Move IP_ROUTER_ALERT out of lock_sock(sk) Kirill Tkhai
2018-03-15 13:20 ` [PATCH net-next 4/5] net: Make ip_ra_chain per struct net Kirill Tkhai
2018-03-16 23:22 ` kbuild test robot
2018-03-17 10:21 ` Kirill Tkhai [this message]
2018-03-15 13:20 ` [PATCH net-next 5/5] net: Replace ip_ra_lock with per-net mutex Kirill Tkhai
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=ffd75716-bbb5-6ccd-0333-77090f222b24@virtuozzo.com \
--to=ktkhai@virtuozzo.com \
--cc=andreyknvl@google.com \
--cc=avagin@virtuozzo.com \
--cc=davem@davemloft.net \
--cc=dvyukov@google.com \
--cc=ebiederm@xmission.com \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=kbuild-all@01.org \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=nikolay@cumulusnetworks.com \
--cc=roman.kapl@sysgo.com \
--cc=soheil@google.com \
--cc=xiyou.wangcong@gmail.com \
--cc=yanhaishuang@cmss.chinamobile.com \
--cc=yoshfuji@linux-ipv6.org \
--cc=yotamg@mellanox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox