All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Zheng Yongjun <zhengyongjun3@huawei.com>,
	davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org,
	kuba@kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, Zheng Yongjun <zhengyongjun3@huawei.com>
Subject: Re: [PATCH v3] ping: Check return value of function 'ping_queue_rcv_skb'
Date: Tue, 8 Jun 2021 14:45:23 +0800	[thread overview]
Message-ID: <202106081430.9qlVE2iO-lkp@intel.com> (raw)
In-Reply-To: <20210608020853.3091939-1-zhengyongjun3@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 3502 bytes --]

Hi Zheng,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]
[also build test WARNING on net/master linus/master sparc-next/master v5.13-rc5 next-20210607]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Zheng-Yongjun/ping-Check-return-value-of-function-ping_queue_rcv_skb/20210608-095716
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git dc8cf7550a703b8b9c94beed621c6c2474347eff
config: ia64-randconfig-r035-20210607 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/bdcbf04f42e253fb727ce96bb2a680bd6c449468
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zheng-Yongjun/ping-Check-return-value-of-function-ping_queue_rcv_skb/20210608-095716
        git checkout bdcbf04f42e253fb727ce96bb2a680bd6c449468
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from arch/ia64/include/asm/pgtable.h:154,
                    from include/linux/pgtable.h:6,
                    from arch/ia64/include/asm/uaccess.h:40,
                    from include/linux/uaccess.h:11,
                    from net/ipv4/ping.c:18:
   arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
   arch/ia64/include/asm/mmu_context.h:127:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
     127 |  unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
         |                                         ^~~~~~~
   net/ipv4/ping.c: In function 'ping_rcv':
>> net/ipv4/ping.c:966:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     966 |  bool rc = false;
         |  ^~~~


vim +966 net/ipv4/ping.c

   946	
   947	
   948	/*
   949	 *	All we need to do is get the socket.
   950	 */
   951	
   952	bool ping_rcv(struct sk_buff *skb)
   953	{
   954		struct sock *sk;
   955		struct net *net = dev_net(skb->dev);
   956		struct icmphdr *icmph = icmp_hdr(skb);
   957	
   958		/* We assume the packet has already been checked by icmp_rcv */
   959	
   960		pr_debug("ping_rcv(skb=%p,id=%04x,seq=%04x)\n",
   961			 skb, ntohs(icmph->un.echo.id), ntohs(icmph->un.echo.sequence));
   962	
   963		/* Push ICMP header back */
   964		skb_push(skb, skb->data - (u8 *)icmph);
   965	
 > 966		bool rc = false;
   967		sk = ping_lookup(net, skb, ntohs(icmph->un.echo.id));
   968		if (sk) {
   969			struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);
   970	
   971			pr_debug("rcv on socket %p\n", sk);
   972			if (skb2 && !ping_queue_rcv_skb(sk, skb2))
   973				rc = true;
   974			sock_put(sk);
   975		}
   976		pr_debug("no socket, dropping\n");
   977	
   978		return rc;
   979	}
   980	EXPORT_SYMBOL_GPL(ping_rcv);
   981	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36517 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v3] ping: Check return value of function 'ping_queue_rcv_skb'
Date: Tue, 08 Jun 2021 14:45:23 +0800	[thread overview]
Message-ID: <202106081430.9qlVE2iO-lkp@intel.com> (raw)
In-Reply-To: <20210608020853.3091939-1-zhengyongjun3@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 3590 bytes --]

Hi Zheng,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]
[also build test WARNING on net/master linus/master sparc-next/master v5.13-rc5 next-20210607]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Zheng-Yongjun/ping-Check-return-value-of-function-ping_queue_rcv_skb/20210608-095716
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git dc8cf7550a703b8b9c94beed621c6c2474347eff
config: ia64-randconfig-r035-20210607 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/bdcbf04f42e253fb727ce96bb2a680bd6c449468
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Zheng-Yongjun/ping-Check-return-value-of-function-ping_queue_rcv_skb/20210608-095716
        git checkout bdcbf04f42e253fb727ce96bb2a680bd6c449468
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from arch/ia64/include/asm/pgtable.h:154,
                    from include/linux/pgtable.h:6,
                    from arch/ia64/include/asm/uaccess.h:40,
                    from include/linux/uaccess.h:11,
                    from net/ipv4/ping.c:18:
   arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
   arch/ia64/include/asm/mmu_context.h:127:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
     127 |  unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
         |                                         ^~~~~~~
   net/ipv4/ping.c: In function 'ping_rcv':
>> net/ipv4/ping.c:966:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     966 |  bool rc = false;
         |  ^~~~


vim +966 net/ipv4/ping.c

   946	
   947	
   948	/*
   949	 *	All we need to do is get the socket.
   950	 */
   951	
   952	bool ping_rcv(struct sk_buff *skb)
   953	{
   954		struct sock *sk;
   955		struct net *net = dev_net(skb->dev);
   956		struct icmphdr *icmph = icmp_hdr(skb);
   957	
   958		/* We assume the packet has already been checked by icmp_rcv */
   959	
   960		pr_debug("ping_rcv(skb=%p,id=%04x,seq=%04x)\n",
   961			 skb, ntohs(icmph->un.echo.id), ntohs(icmph->un.echo.sequence));
   962	
   963		/* Push ICMP header back */
   964		skb_push(skb, skb->data - (u8 *)icmph);
   965	
 > 966		bool rc = false;
   967		sk = ping_lookup(net, skb, ntohs(icmph->un.echo.id));
   968		if (sk) {
   969			struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);
   970	
   971			pr_debug("rcv on socket %p\n", sk);
   972			if (skb2 && !ping_queue_rcv_skb(sk, skb2))
   973				rc = true;
   974			sock_put(sk);
   975		}
   976		pr_debug("no socket, dropping\n");
   977	
   978		return rc;
   979	}
   980	EXPORT_SYMBOL_GPL(ping_rcv);
   981	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36517 bytes --]

  parent reply	other threads:[~2021-06-08  6:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-08  2:08 [PATCH v3] ping: Check return value of function 'ping_queue_rcv_skb' Zheng Yongjun
2021-06-08  6:08 ` Leon Romanovsky
2021-06-08  6:29   ` 答复: " zhengyongjun
2021-06-08  6:45 ` kernel test robot [this message]
2021-06-08  6:45   ` kernel test robot
2021-06-08  7:13 ` kernel test robot
2021-06-08  7:13   ` kernel test robot

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=202106081430.9qlVE2iO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    --cc=zhengyongjun3@huawei.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.