Subject: [syzbot] WARNING in batadv_nc_purge_paths

From: syzbot <[email-masked]>
Date: Tue, 29 Nov 2022 01:28:34 -0800

Hello,

syzbot found the following issue on:

HEAD commit:    65762d97e6fa Merge branch 'for-next/perf' into for-kernelci
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
console output: https://syzkaller.appspot.com/x/log.txt?x=1558f7fd880000
kernel config:  https://syzkaller.appspot.com/x/.config?x=56d0c7c3a2304e8f
dashboard link: https://syzkaller.appspot.com/bug?extid=5b817d9e3b5fb5f051fc
compiler:       Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/52f702197b30/disk-65762d97.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/72189c2789ce/vmlinux-65762d97.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ec0349196c98/Image-65762d97.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email-masked]

------------[ cut here ]------------
WARNING: CPU: 1 PID: 3498 at kernel/softirq.c:376 __local_bh_enable_ip+0x180/0x1a4 kernel/softirq.c:376
Modules linked in:
CPU: 1 PID: 3498 Comm: kworker/u4:11 Not tainted 6.1.0-rc6-syzkaller-32653-g65762d97e6fa #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/30/2022
Workqueue: bat_events batadv_nc_worker

pstate: 20400005 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __local_bh_enable_ip+0x180/0x1a4 kernel/softirq.c:376
lr : __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:167 [inline]
lr : _raw_spin_unlock_bh+0x48/0x58 kernel/locking/spinlock.c:210
sp : ffff80001398bc60
x29: ffff80001398bc60
 x28: ffff80000d2fb000
 x27: ffff80000d2fb000

x26: 000000000000007e
 x25: 0000000000000004
 x24: 0000000000000000

x23: ffff0000f2dcdf80
 x22: 0000000000000000
 x21: ffff00011ed2b480

x20: ffff80000bf44c08
 x19: 0000000000000201
 x18: 0000000000000163

x17: ffff80000c0cd83c
 x16: ffff80000dbe6158
 x15: ffff00011ed2b480

x14: 00000000000000c8
 x13: 00000000ffffffff
 x12: ffff00011ed2b480

x11: ff808000095cfff8
 x10: 00000000ffffffff
 x9 : ffff80000d2d09a0

x8 : 0000000000000201
 x7 : ffff80000bf44a98
 x6 : 0000000000000000

x5 : 0000000000000000
 x4 : 0000000000000001
 x3 : 0000000000000000

x2 : 0000000000000001
 x1 : 0000000000000201
 x0 : ffff80000bf44c08

Call trace:
 __local_bh_enable_ip+0x180/0x1a4 kernel/softirq.c:376
 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:167 [inline]
 _raw_spin_unlock_bh+0x48/0x58 kernel/locking/spinlock.c:210
 spin_unlock_bh include/linux/spinlock.h:395 [inline]
 batadv_nc_purge_paths+0x1d0/0x214 net/batman-adv/network-coding.c:471
 batadv_nc_worker+0x3a8/0x484 net/batman-adv/network-coding.c:722
 process_one_work+0x2d8/0x504 kernel/workqueue.c:2289
 worker_thread+0x340/0x610 kernel/workqueue.c:2436
 kthread+0x12c/0x158 kernel/kthread.c:376
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:863
irq event stamp: 28503233
hardirqs last  enabled at (28503231): [<ffff800008106f78>] __local_bh_enable_ip+0x13c/0x1a4 kernel/softirq.c:401
hardirqs last disabled at (28503233): [<ffff80000c0809a4>] __el1_irq arch/arm64/kernel/entry-common.c:468 [inline]
hardirqs last disabled at (28503233): [<ffff80000c0809a4>] el1_interrupt+0x24/0x68 arch/arm64/kernel/entry-common.c:486
softirqs last  enabled at (28503230): [<ffff80000bf44c08>] spin_unlock_bh include/linux/spinlock.h:395 [inline]
softirqs last  enabled at (28503230): [<ffff80000bf44c08>] batadv_nc_purge_paths+0x1d0/0x214 net/batman-adv/network-coding.c:471
softirqs last disabled at (28503232): [<ffff80000bf44a98>] spin_lock_bh include/linux/spinlock.h:355 [inline]
softirqs last disabled at (28503232): [<ffff80000bf44a98>] batadv_nc_purge_paths+0x60/0x214 net/batman-adv/network-coding.c:442
---[ end trace 0000000000000000 ]---

---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at [email-masked].

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.