All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH bpf-next 6/8] bpf: tcp: bpf iter batching and lock_sock
Date: Sat, 26 Jun 2021 22:42:28 +0800	[thread overview]
Message-ID: <202106262240.4MnoPsCs-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210625200523.726854-1-kafai@fb.com>
References: <20210625200523.726854-1-kafai@fb.com>
TO: Martin KaFai Lau <kafai@fb.com>
TO: bpf(a)vger.kernel.org
CC: Alexei Starovoitov <ast@kernel.org>
CC: Daniel Borkmann <daniel@iogearbox.net>
CC: Eric Dumazet <edumazet@google.com>
CC: kernel-team(a)fb.com
CC: Neal Cardwell <ncardwell@google.com>
CC: netdev(a)vger.kernel.org
CC: Yonghong Song <yhs@fb.com>
CC: Yuchung Cheng <ycheng@google.com>

Hi Martin,

I love your patch! Perhaps something to improve:

[auto build test WARNING on bpf-next/master]

url:    https://github.com/0day-ci/linux/commits/Martin-KaFai-Lau/bpf-Allow-bpf-tcp-iter-to-do-bpf_setsockopt/20210626-040650
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
:::::: branch date: 19 hours ago
:::::: commit date: 19 hours ago
config: x86_64-randconfig-m001-20210625 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

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

smatch warnings:
net/ipv4/tcp_ipv4.c:2931 bpf_iter_tcp_seq_show() error: uninitialized symbol 'slow'.

vim +/slow +2931 net/ipv4/tcp_ipv4.c

5f78445efda470 Martin KaFai Lau 2021-06-25  2893  
52d87d5f6418ba Yonghong Song    2020-06-23  2894  static int bpf_iter_tcp_seq_show(struct seq_file *seq, void *v)
52d87d5f6418ba Yonghong Song    2020-06-23  2895  {
52d87d5f6418ba Yonghong Song    2020-06-23  2896  	struct bpf_iter_meta meta;
52d87d5f6418ba Yonghong Song    2020-06-23  2897  	struct bpf_prog *prog;
52d87d5f6418ba Yonghong Song    2020-06-23  2898  	struct sock *sk = v;
5f78445efda470 Martin KaFai Lau 2021-06-25  2899  	bool slow;
52d87d5f6418ba Yonghong Song    2020-06-23  2900  	uid_t uid;
5f78445efda470 Martin KaFai Lau 2021-06-25  2901  	int ret;
52d87d5f6418ba Yonghong Song    2020-06-23  2902  
52d87d5f6418ba Yonghong Song    2020-06-23  2903  	if (v == SEQ_START_TOKEN)
52d87d5f6418ba Yonghong Song    2020-06-23  2904  		return 0;
52d87d5f6418ba Yonghong Song    2020-06-23  2905  
5f78445efda470 Martin KaFai Lau 2021-06-25  2906  	if (sk_fullsock(sk))
5f78445efda470 Martin KaFai Lau 2021-06-25  2907  		slow = lock_sock_fast(sk);
5f78445efda470 Martin KaFai Lau 2021-06-25  2908  
5f78445efda470 Martin KaFai Lau 2021-06-25  2909  	if (unlikely(sk_unhashed(sk))) {
5f78445efda470 Martin KaFai Lau 2021-06-25  2910  		ret = SEQ_SKIP;
5f78445efda470 Martin KaFai Lau 2021-06-25  2911  		goto unlock;
5f78445efda470 Martin KaFai Lau 2021-06-25  2912  	}
5f78445efda470 Martin KaFai Lau 2021-06-25  2913  
52d87d5f6418ba Yonghong Song    2020-06-23  2914  	if (sk->sk_state == TCP_TIME_WAIT) {
52d87d5f6418ba Yonghong Song    2020-06-23  2915  		uid = 0;
52d87d5f6418ba Yonghong Song    2020-06-23  2916  	} else if (sk->sk_state == TCP_NEW_SYN_RECV) {
52d87d5f6418ba Yonghong Song    2020-06-23  2917  		const struct request_sock *req = v;
52d87d5f6418ba Yonghong Song    2020-06-23  2918  
52d87d5f6418ba Yonghong Song    2020-06-23  2919  		uid = from_kuid_munged(seq_user_ns(seq),
52d87d5f6418ba Yonghong Song    2020-06-23  2920  				       sock_i_uid(req->rsk_listener));
52d87d5f6418ba Yonghong Song    2020-06-23  2921  	} else {
52d87d5f6418ba Yonghong Song    2020-06-23  2922  		uid = from_kuid_munged(seq_user_ns(seq), sock_i_uid(sk));
52d87d5f6418ba Yonghong Song    2020-06-23  2923  	}
52d87d5f6418ba Yonghong Song    2020-06-23  2924  
52d87d5f6418ba Yonghong Song    2020-06-23  2925  	meta.seq = seq;
52d87d5f6418ba Yonghong Song    2020-06-23  2926  	prog = bpf_iter_get_info(&meta, false);
5f78445efda470 Martin KaFai Lau 2021-06-25  2927  	ret = tcp_prog_seq_show(prog, &meta, v, uid);
5f78445efda470 Martin KaFai Lau 2021-06-25  2928  
5f78445efda470 Martin KaFai Lau 2021-06-25  2929  unlock:
5f78445efda470 Martin KaFai Lau 2021-06-25  2930  	if (sk_fullsock(sk))
5f78445efda470 Martin KaFai Lau 2021-06-25 @2931  		unlock_sock_fast(sk, slow);
5f78445efda470 Martin KaFai Lau 2021-06-25  2932  	return ret;
5f78445efda470 Martin KaFai Lau 2021-06-25  2933  

---
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: 39072 bytes --]

             reply	other threads:[~2021-06-26 14:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-26 14:42 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-06-26  5:21 [PATCH bpf-next 6/8] bpf: tcp: bpf iter batching and lock_sock kernel test robot
2021-06-25 20:04 [PATCH bpf-next 0/8] bpf: Allow bpf tcp iter to do bpf_setsockopt Martin KaFai Lau
2021-06-25 20:05 ` [PATCH bpf-next 6/8] bpf: tcp: bpf iter batching and lock_sock Martin KaFai Lau
2021-06-29 17:27   ` Yonghong Song
2021-06-29 17:44     ` Martin KaFai Lau
2021-06-29 17:57       ` Yonghong Song
2021-06-29 18:06         ` Martin KaFai Lau
2021-06-29 18:55           ` Yonghong Song

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=202106262240.4MnoPsCs-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.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 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.