From: kernel test robot <lkp@intel.com>
To: John Fastabend <john.fastabend@gmail.com>,
alexei.starovoitov@gmail.com, daniel@iogearbox.net
Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org,
bpf@vger.kernel.org, jakub@cloudflare.com, lmb@cloudflare.com
Subject: Re: [bpf-next PATCH 4/6] bpf, sockmap: remove dropped data on errors in redirect case
Date: Fri, 9 Oct 2020 15:27:57 +0800 [thread overview]
Message-ID: <202010091558.lhcjaYoT-lkp@intel.com> (raw)
In-Reply-To: <160221868511.12042.12285689875540180401.stgit@john-Precision-5820-Tower>
[-- Attachment #1: Type: text/plain, Size: 3910 bytes --]
Hi John,
I love your patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/John-Fastabend/sockmap-sk_skb-program-memory-acct-fixes/20201009-124625
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-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/3a8d6f22c5f47a013278031170cb559d1f6d1e69
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review John-Fastabend/sockmap-sk_skb-program-memory-acct-fixes/20201009-124625
git checkout 3a8d6f22c5f47a013278031170cb559d1f6d1e69
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
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 >>):
net/core/skmsg.c: In function 'sk_psock_skb_redirect':
>> net/core/skmsg.c:714:7: warning: variable 'ingress' set but not used [-Wunused-but-set-variable]
714 | bool ingress;
| ^~~~~~~
vim +/ingress +714 net/core/skmsg.c
604326b41a6fb9 Daniel Borkmann 2018-10-13 709
93dd5f185916b0 John Fastabend 2020-06-25 710 static void sk_psock_skb_redirect(struct sk_buff *skb)
604326b41a6fb9 Daniel Borkmann 2018-10-13 711 {
604326b41a6fb9 Daniel Borkmann 2018-10-13 712 struct sk_psock *psock_other;
604326b41a6fb9 Daniel Borkmann 2018-10-13 713 struct sock *sk_other;
604326b41a6fb9 Daniel Borkmann 2018-10-13 @714 bool ingress;
604326b41a6fb9 Daniel Borkmann 2018-10-13 715
ca2f5f21dbbd5e John Fastabend 2020-05-29 716 sk_other = tcp_skb_bpf_redirect_fetch(skb);
3a8d6f22c5f47a John Fastabend 2020-10-08 717 /* This error is a buggy BPF program, it returned a redirect
3a8d6f22c5f47a John Fastabend 2020-10-08 718 * return code, but then didn't set a redirect interface.
3a8d6f22c5f47a John Fastabend 2020-10-08 719 */
ca2f5f21dbbd5e John Fastabend 2020-05-29 720 if (unlikely(!sk_other)) {
ca2f5f21dbbd5e John Fastabend 2020-05-29 721 kfree_skb(skb);
ca2f5f21dbbd5e John Fastabend 2020-05-29 722 return;
ca2f5f21dbbd5e John Fastabend 2020-05-29 723 }
ca2f5f21dbbd5e John Fastabend 2020-05-29 724 psock_other = sk_psock(sk_other);
3a8d6f22c5f47a John Fastabend 2020-10-08 725 /* This error indicates the socket is being torn down or had another
3a8d6f22c5f47a John Fastabend 2020-10-08 726 * error that caused the pipe to break. We can't send a packet on
3a8d6f22c5f47a John Fastabend 2020-10-08 727 * a socket that is in this state so we drop the skb.
3a8d6f22c5f47a John Fastabend 2020-10-08 728 */
ca2f5f21dbbd5e John Fastabend 2020-05-29 729 if (!psock_other || sock_flag(sk_other, SOCK_DEAD) ||
ca2f5f21dbbd5e John Fastabend 2020-05-29 730 !sk_psock_test_state(psock_other, SK_PSOCK_TX_ENABLED)) {
ca2f5f21dbbd5e John Fastabend 2020-05-29 731 kfree_skb(skb);
ca2f5f21dbbd5e John Fastabend 2020-05-29 732 return;
ca2f5f21dbbd5e John Fastabend 2020-05-29 733 }
ca2f5f21dbbd5e John Fastabend 2020-05-29 734
ca2f5f21dbbd5e John Fastabend 2020-05-29 735 ingress = tcp_skb_bpf_ingress(skb);
ca2f5f21dbbd5e John Fastabend 2020-05-29 736 skb_queue_tail(&psock_other->ingress_skb, skb);
ca2f5f21dbbd5e John Fastabend 2020-05-29 737 schedule_work(&psock_other->work);
ca2f5f21dbbd5e John Fastabend 2020-05-29 738 }
ca2f5f21dbbd5e John Fastabend 2020-05-29 739
---
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: 66191 bytes --]
next prev parent reply other threads:[~2020-10-09 7:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-09 4:43 [bpf-next PATCH 0/6] sockmap/sk_skb program memory acct fixes John Fastabend
2020-10-09 4:43 ` [bpf-next PATCH 1/6] bpf, sockmap: skb verdict SK_PASS to self already checked rmem limits John Fastabend
2020-10-09 4:44 ` [bpf-next PATCH 2/6] bpf, sockmap: On receive programs try to fast track SK_PASS ingress John Fastabend
2020-10-09 7:28 ` kernel test robot
2020-10-09 4:44 ` [bpf-next PATCH 3/6] bpf, sockmap: remove skb_set_owner_w wmem will be taken later from sendpage John Fastabend
2020-10-09 4:44 ` [bpf-next PATCH 4/6] bpf, sockmap: remove dropped data on errors in redirect case John Fastabend
2020-10-09 7:27 ` kernel test robot [this message]
2020-10-09 4:45 ` [bpf-next PATCH 5/6] bpf, sockmap: Remove skb_orphan and let normal skb_kfree do cleanup John Fastabend
2020-10-09 4:45 ` [bpf-next PATCH 6/6] bpf, sockmap: Add memory accounting so skbs on ingress lists are visible John Fastabend
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=202010091558.lhcjaYoT-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexei.starovoitov@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jakub@cloudflare.com \
--cc=john.fastabend@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=lmb@cloudflare.com \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).