mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Howells <dhowells@redhat.com>, yin31149@gmail.com
Cc: kbuild-all@lists.01.org, Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, dhowells@redhat.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2] net: Fix suspicious RCU usage in bpf_sk_reuseport_detach()
Date: Wed, 17 Aug 2022 16:13:50 +0800	[thread overview]
Message-ID: <202208171521.JiKYmnhP-lkp@intel.com> (raw)
In-Reply-To: <166065637961.4008018.10420960640773607710.stgit@warthog.procyon.org.uk>

Hi David,

I love your patch! Yet something to improve:

[auto build test ERROR on net/master]

url:    https://github.com/intel-lab-lkp/linux/commits/David-Howells/net-Fix-suspicious-RCU-usage-in-bpf_sk_reuseport_detach/20220816-212744
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git ae806c7805571a9813e41bf6763dd08d0706f4ed
config: x86_64-rhel-8.3-kvm (https://download.01.org/0day-ci/archive/20220817/202208171521.JiKYmnhP-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/fe74fdc1e7fe8aa84006265deb7b55f40bcc8736
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review David-Howells/net-Fix-suspicious-RCU-usage-in-bpf_sk_reuseport_detach/20220816-212744
        git checkout fe74fdc1e7fe8aa84006265deb7b55f40bcc8736
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   ld: kernel/bpf/reuseport_array.o: in function `bpf_sk_reuseport_detach':
>> kernel/bpf/reuseport_array.c:28: undefined reference to `lockdep_is_held'


vim +28 kernel/bpf/reuseport_array.c

    20	
    21	/* The caller must hold the reuseport_lock */
    22	void bpf_sk_reuseport_detach(struct sock *sk)
    23	{
    24		struct sock __rcu **socks;
    25	
    26		write_lock_bh(&sk->sk_callback_lock);
    27		socks = __rcu_dereference_sk_user_data_with_flags_check(
  > 28			sk, SK_USER_DATA_BPF, lockdep_is_held(&sk->sk_callback_lock));
    29		if (socks) {
    30			WRITE_ONCE(sk->sk_user_data, NULL);
    31			/*
    32			 * Do not move this NULL assignment outside of
    33			 * sk->sk_callback_lock because there is
    34			 * a race with reuseport_array_free()
    35			 * which does not hold the reuseport_lock.
    36			 */
    37			RCU_INIT_POINTER(*socks, NULL);
    38		}
    39		write_unlock_bh(&sk->sk_callback_lock);
    40	}
    41	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

      parent reply	other threads:[~2022-08-17  8:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-16 13:26 David Howells
2022-08-17  5:19 ` kernel test robot
2022-08-17  8:13 ` kernel test robot [this message]

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=202208171521.JiKYmnhP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dhowells@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yin31149@gmail.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

all inboxes | Powered by JetHome®