public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat•com>
To: kernel test robot <rong.a.chen@intel•com>
Cc: "David Miller" <davem@davemloft•net>,
	netdev@vger•kernel.org,
	"Jesper Dangaard Brouer" <brouer@redhat•com>,
	"Daniel Borkmann" <daniel@iogearbox•net>,
	"Alexei Starovoitov" <ast@kernel•org>,
	"Jakub Kicinski" <jakub.kicinski@netronome•com>,
	BjörnTöpel <bjorn.topel@gmail•com>,
	lkp@01•org
Subject: Re: [xdp] 9cb54e254c: kernel/bpf/devmap.c:#suspicious_rcu_dereference_check()
Date: Wed, 10 Apr 2019 12:00:58 +0200	[thread overview]
Message-ID: <87r2aaw55x.fsf@toke.dk> (raw)
In-Reply-To: <20190410075954.GC17122@shao2-debian>

kernel test robot <rong.a.chen@intel•com> writes:

> FYI, we noticed the following commit (built with gcc-7):
>
> commit: 9cb54e254ca479ce636857a1fd1e1a3e9f8796b1 ("[PATCH net-next v4 4/6] xdp: Always use a devmap for XDP_REDIRECT to a device")
> url: https://github.com/0day-ci/linux/commits/Toke-H-iland-J-rgensen/xdp-Use-a-default-map-for-xdp_redirect-helper/20190409-161851
>
>
> in testcase: trinity
> with following parameters:
>
> 	runtime: 300s
>
> test-description: Trinity is a linux system call fuzz tester.
> test-url: http://codemonkey.org.uk/projects/trinity/
>
>
> on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 8G
>
> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
>
>
> +--------------------------------------------------------------+------------+------------+
> |                                                              | c76c665440 | 9cb54e254c |
> +--------------------------------------------------------------+------------+------------+
> | boot_successes                                               | 0          | 0          |
> | boot_failures                                                | 40         | 38         |
> | BUG:kernel_reboot-without-warning_in_test_stage              | 28         | 10         |
> | BUG:kernel_hang_in_boot_stage                                | 12         | 12         |
> | WARNING:suspicious_RCU_usage                                 | 0          | 16         |
> | kernel/bpf/devmap.c:#suspicious_rcu_dereference_check()usage | 0          | 16         |
> +--------------------------------------------------------------+------------+------------+
>
>
>
> [  413.653218] WARNING: suspicious RCU usage
> [  413.654564] 5.1.0-rc4-00599-g9cb54e2 #43 Tainted: G                T
> [  413.656563] -----------------------------
> [  413.657808] kernel/bpf/devmap.c:807 suspicious rcu_dereference_check() usage!
> [  413.660285] 
> [  413.660285] other info that might help us debug this:
> [  413.660285] 
> [  413.662614] 
> [  413.662614] rcu_scheduler_active = 2, debug_locks = 1
> [  413.664483] 2 locks held by trinity-c3/2248:
> [  413.665800]  #0: 00000000713e8e50 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x81/0x90
> [  413.668184]  #1: 000000005e54a26c (&p->lock){+.+.}, at: seq_lseek+0x42/0x1c0
> [  413.670412] 
> [  413.670412] stack backtrace:
> [  413.671876] CPU: 0 PID: 2248 Comm: trinity-c3 Tainted: G                T 5.1.0-rc4-00599-g9cb54e2 #43
> [  413.674557] Call Trace:
> [  413.675374]  dump_stack+0x1e/0x28
> [  413.676366]  lockdep_rcu_suspicious+0xc6/0xd0
> [  413.677802]  dev_map_default_show+0x84/0xd0

Ah, right, seems I forgot an rcu_read_lock() here. Will fix :)

-Toke

  reply	other threads:[~2019-04-10 10:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08 17:05 [PATCH net-next v4 0/6] xdp: Use a default map for xdp_redirect helper Toke Høiland-Jørgensen
2019-04-08 17:05 ` [PATCH net-next v4 5/6] xdp: Add devmap_idx map type for looking up devices by ifindex Toke Høiland-Jørgensen
2019-04-08 17:05 ` [PATCH net-next v4 3/6] xdp: Refactor devmap code in preparation for subsequent additions Toke Høiland-Jørgensen
2019-04-08 17:05 ` [PATCH net-next v4 1/6] net: xdp: refactor XDP attach Toke Høiland-Jørgensen
2019-04-08 20:23   ` Daniel Borkmann
2019-05-09 10:40     ` Björn Töpel
2019-04-09 12:54   ` kbuild test robot
2019-04-08 17:05 ` [PATCH net-next v4 2/6] net: xdp: remove XDP_QUERY_PROG Toke Høiland-Jørgensen
2019-04-08 17:05 ` [PATCH net-next v4 4/6] xdp: Always use a devmap for XDP_REDIRECT to a device Toke Høiland-Jørgensen
2019-04-09  8:25   ` Jesper Dangaard Brouer
2019-04-09  9:23     ` Toke Høiland-Jørgensen
2019-04-10  7:59   ` [xdp] 9cb54e254c: kernel/bpf/devmap.c:#suspicious_rcu_dereference_check() kernel test robot
2019-04-10 10:00     ` Toke Høiland-Jørgensen [this message]
2019-04-08 17:05 ` [PATCH net-next v4 6/6] selftests/bpf: Add test for default devmap allocation Toke Høiland-Jørgensen

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=87r2aaw55x.fsf@toke.dk \
    --to=toke@redhat$(echo .)com \
    --cc=ast@kernel$(echo .)org \
    --cc=bjorn.topel@gmail$(echo .)com \
    --cc=brouer@redhat$(echo .)com \
    --cc=daniel@iogearbox$(echo .)net \
    --cc=davem@davemloft$(echo .)net \
    --cc=jakub.kicinski@netronome$(echo .)com \
    --cc=lkp@01$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=rong.a.chen@intel$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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