From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com ([192.55.52.43]:39597 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752568AbeCPXXp (ORCPT ); Fri, 16 Mar 2018 19:23:45 -0400 Date: Sat, 17 Mar 2018 07:22:54 +0800 From: kbuild test robot To: Kirill Tkhai 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, ktkhai@virtuozzo.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 Message-ID: <201803170753.rO48WL2s%fengguang.wu@intel.com> References: <152112003454.30586.15301041903593569660.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <152112003454.30586.15301041903593569660.stgit@localhost.localdomain> Sender: netdev-owner@vger.kernel.org List-ID: 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) -- >> net/ipv4/ip_sockglue.c:347:18: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip_ra_chain [noderef] **rap @@ got n [noderef] **rap @@ net/ipv4/ip_sockglue.c:347:18: expected struct ip_ra_chain [noderef] **rap net/ipv4/ip_sockglue.c:347:18: got struct ip_ra_chain ** 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