Re: One-off rcu_nocb_rdp_deoffload bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> Hello, Frederic,
>
> I have seen this once on Neeraj's tree with a few commits on top (-rcu
> commit 46774278c74f ("rcutorture: Test start-poll primitives with
> interrupts disabled").  But only the once so far.
>
> This is the WARN_ON_ONCE(rcu_segcblist_n_cbs(&rdp->cblist)) in
> rcu_nocb_rdp_deoffload().
>
> Thoughts?
>

The rcu_segcblist_extract_done_cbs() doesn't reduce the count of rsclp->len,
in rcu_do_bacth().  this may cause that after we execute the barrier rcu
callback, before decrementing the count of rsclp->len,  the rcu_barrier()
returns and makes a judgment of rcu_segcblist_n_cbs(&rdp->cblist)  in
rcu_nocb_rdp_deoffload().

maybe can use WARN_ON_ONCE(rcu_segcblist_n_segment_cbs()) instead
of WARN_ON_ONCE(rcu_segcblist_n_cbs())

Thoughts?

Thanks
Zqiang




>                                                 Thanx, Paul
>
> ------------------------------------------------------------------------
>
> [18839.499664] ------------[ cut here ]------------
> [18839.500993] WARNING: CPU: 19 PID: 100 at kernel/rcu/tree_nocb.h:1061 rcu_nocb_rdp_deoffload+0x292/0x2a0
> [18839.503545] Modules linked in:
> [18839.504443] CPU: 19 UID: 0 PID: 100 Comm: rcu_nocb_toggle Not tainted 6.11.0-rc3-00459-gba3eb80edec7-dirty #1553
> [18839.507190] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
> [18839.510002] RIP: 0010:rcu_nocb_rdp_deoffload+0x292/0x2a0
> [18839.511451] Code: e9 3c ff ff ff 4c 89 e6 48 89 ef e8 98 0d e1 00 e9 3b fe ff ff 90 0f 0b 90 48 8b 83 c0 00 00 00 48 85 c0 0f 84 0b fe ff ff 90 <0f> 0b 90 e9 02 fe ff ff e8 e1 60 e0 00 90 90 90 90 90 90 90 90 90
> [18839.516469] RSP: 0000:ffffa05a8049be30 EFLAGS: 00010006
> [18839.517908] RAX: 0000000000000081 RBX: ffff956c5eaaf480 RCX: 0000000000000000
> [18839.519849] RDX: 0000000000000001 RSI: 0000000000000287 RDI: ffff956c5eaaf5f0
> [18839.521804] RBP: ffff956c5eaaf5f0 R08: 0000112269aee7fd R09: 0000000000000001
> [18839.523747] R10: 00000000000020e8 R11: 0000000000000000 R12: 0000000000000292
> [18839.525623] R13: 0000000000000000 R14: ffff956c5ea2f480 R15: 0000000000000001
> [18839.527557] FS:  0000000000000000(0000) GS:ffff956c5eec0000(0000) knlGS:0000000000000000
> [18839.529917] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [18839.531556] CR2: 0000000000000000 CR3: 0000000001cfa000 CR4: 00000000000006f0
> [18839.533495] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> [18839.535395] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> [18839.537322] Call Trace:
> [18839.538006]  <TASK>
> [18839.538596]  ? __warn+0x7e/0x120
> [18839.539491]  ? rcu_nocb_rdp_deoffload+0x292/0x2a0
> [18839.540757]  ? report_bug+0x18e/0x1a0
> [18839.541805]  ? handle_bug+0x3d/0x70
> [18839.542837]  ? exc_invalid_op+0x18/0x70
> [18839.543959]  ? asm_exc_invalid_op+0x1a/0x20
> [18839.545165]  ? rcu_nocb_rdp_deoffload+0x292/0x2a0
> [18839.546547]  rcu_nocb_cpu_deoffload+0x70/0xa0
> [18839.547814]  rcu_nocb_toggle+0x136/0x1c0
> [18839.548960]  ? __pfx_rcu_nocb_toggle+0x10/0x10
> [18839.550073]  kthread+0xd1/0x100
> [18839.550958]  ? __pfx_kthread+0x10/0x10
> [18839.552008]  ret_from_fork+0x2f/0x50
> [18839.553002]  ? __pfx_kthread+0x10/0x10
> [18839.553968]  ret_from_fork_asm+0x1a/0x30
> [18839.555038]  </TASK>
>
>




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux