[Android 6.1] BUG: workqueue leaked lock or atomic in bpf_prog_free_deferred

5 views
Skip to first unread message

syzbot

unread,
Feb 12, 2024, 9:25:22 PMFeb 12
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 886c9d1fc2b3 ANDROID: arm64: virt: Invalidate tlb once the..
git tree: android14-6.1
console output: https://syzkaller.appspot.com/x/log.txt?x=13fa2720180000
kernel config: https://syzkaller.appspot.com/x/.config?x=54c503ca94c7e582
dashboard link: https://syzkaller.appspot.com/bug?extid=d1cfbaac8abb553c109a
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16e2f648180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=103ff100180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/7dae106a685a/disk-886c9d1f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4a65309e2b0f/vmlinux-886c9d1f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/e6076464404a/bzImage-886c9d1f.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+d1cfba...@syzkaller.appspotmail.com

BUG: workqueue leaked lock or atomic: kworker/0:3/0x00000001/820
last function: bpf_prog_free_deferred
CPU: 0 PID: 820 Comm: kworker/0:3 Not tainted 6.1.68-syzkaller-00010-g886c9d1fc2b3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Workqueue: events bpf_prog_free_deferred
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
dump_stack+0x15/0x1b lib/dump_stack.c:113
process_one_work+0x94e/0xcb0 kernel/workqueue.c:2314
worker_thread+0xa60/0x1260 kernel/workqueue.c:2446
kthread+0x26d/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
BUG: workqueue leaked lock or atomic: kworker/0:3/0x00000001/820
last function: srcu_invoke_callbacks
CPU: 0 PID: 820 Comm: kworker/0:3 Not tainted 6.1.68-syzkaller-00010-g886c9d1fc2b3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Workqueue: rcu_gp srcu_invoke_callbacks
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
dump_stack+0x15/0x1b lib/dump_stack.c:113
process_one_work+0x94e/0xcb0 kernel/workqueue.c:2314
worker_thread+0xa60/0x1260 kernel/workqueue.c:2446
kthread+0x26d/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
BUG: workqueue leaked lock or atomic: kworker/0:3/0x00000001/820
last function: process_srcu
CPU: 0 PID: 820 Comm: kworker/0:3 Not tainted 6.1.68-syzkaller-00010-g886c9d1fc2b3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Workqueue: rcu_gp process_srcu
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
dump_stack+0x15/0x1b lib/dump_stack.c:113
process_one_work+0x94e/0xcb0 kernel/workqueue.c:2314
worker_thread+0xa60/0x1260 kernel/workqueue.c:2446
kthread+0x26d/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
BUG: workqueue leaked lock or atomic: kworker/0:3/0x00000001/820
last function: vmstat_update
CPU: 0 PID: 820 Comm: kworker/0:3 Not tainted 6.1.68-syzkaller-00010-g886c9d1fc2b3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Workqueue: mm_percpu_wq vmstat_update
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
dump_stack+0x15/0x1b lib/dump_stack.c:113
process_one_work+0x94e/0xcb0 kernel/workqueue.c:2314
worker_thread+0xa60/0x1260 kernel/workqueue.c:2446
kthread+0x26d/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
BUG: workqueue leaked lock or atomic: kworker/0:3/0x00000001/820
last function: vmstat_shepherd
CPU: 0 PID: 820 Comm: kworker/0:3 Not tainted 6.1.68-syzkaller-00010-g886c9d1fc2b3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Workqueue: events vmstat_shepherd
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
dump_stack+0x15/0x1b lib/dump_stack.c:113
process_one_work+0x94e/0xcb0 kernel/workqueue.c:2314
worker_thread+0xa60/0x1260 kernel/workqueue.c:2446
kthread+0x26d/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
BUG: workqueue leaked lock or atomic: kworker/0:3/0x00000001/820
last function: srcu_invoke_callbacks
CPU: 0 PID: 820 Comm: kworker/0:3 Not tainted 6.1.68-syzkaller-00010-g886c9d1fc2b3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Workqueue: rcu_gp srcu_invoke_callbacks
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
dump_stack+0x15/0x1b lib/dump_stack.c:113
process_one_work+0x94e/0xcb0 kernel/workqueue.c:2314
worker_thread+0xa60/0x1260 kernel/workqueue.c:2446
kthread+0x26d/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
BUG: workqueue leaked lock or atomic: kworker/0:3/0x00000001/820
last function: psi_avgs_work
CPU: 0 PID: 820 Comm: kworker/0:3 Not tainted 6.1.68-syzkaller-00010-g886c9d1fc2b3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Workqueue: events psi_avgs_work
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
dump_stack+0x15/0x1b lib/dump_stack.c:113
process_one_work+0x94e/0xcb0 kernel/workqueue.c:2314
worker_thread+0xa60/0x1260 kernel/workqueue.c:2446
kthread+0x26d/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
BUG: scheduling while atomic: kworker/0:3/820/0x00000002
Modules linked in:
Preemption disabled at:
[<ffffffff81b65ac6>] spin_lock include/linux/spinlock.h:350 [inline]
[<ffffffff81b65ac6>] free_vmap_area_noflush+0x226/0xa30 mm/vmalloc.c:1837
CPU: 0 PID: 820 Comm: kworker/0:3 Not tainted 6.1.68-syzkaller-00010-g886c9d1fc2b3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Workqueue: 0x0 (events)
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
dump_stack+0x15/0x1b lib/dump_stack.c:113
__schedule_bug+0x195/0x260 kernel/sched/core.c:5960
schedule_debug kernel/sched/core.c:5987 [inline]
__schedule+0xce9/0x1540 kernel/sched/core.c:6622
schedule+0xc3/0x180 kernel/sched/core.c:6805
worker_thread+0xefa/0x1260 kernel/workqueue.c:2467
kthread+0x26d/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>


---
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 syzk...@googlegroups.com.

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

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Feb 18, 2024, 10:12:21 AMFeb 18
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 993bed180178 Merge "Merge branch 'android13-5.15' into bra..
git tree: android13-5.15-lts
console output: https://syzkaller.appspot.com/x/log.txt?x=141b4f52180000
kernel config: https://syzkaller.appspot.com/x/.config?x=49ce29477ba81e8f
dashboard link: https://syzkaller.appspot.com/bug?extid=b7ad5586a2f214813a7d
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15b334f8180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11ea3152180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/4098d24d4c8b/disk-993bed18.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/94fbc07ac02d/vmlinux-993bed18.xz
kernel image: https://storage.googleapis.com/syzbot-assets/eed14de06c19/bzImage-993bed18.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+b7ad55...@syzkaller.appspotmail.com

BUG: workqueue leaked lock or atomic: kworker/1:3/0x00000001/605
last function: bpf_prog_free_deferred
CPU: 1 PID: 605 Comm: kworker/1:3 Not tainted 5.15.148-syzkaller-00718-g993bed180178 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Workqueue: events bpf_prog_free_deferred
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
dump_stack+0x15/0x17 lib/dump_stack.c:113
process_one_work+0x8d8/0xc10 kernel/workqueue.c:2340
worker_thread+0xad5/0x12a0 kernel/workqueue.c:2472
kthread+0x421/0x510 kernel/kthread.c:337
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
</TASK>
BUG: scheduling while atomic: kworker/1:3/605/0x00000002
Modules linked in:
Preemption disabled at:
[<ffffffff81ac3aed>] spin_lock include/linux/spinlock.h:363 [inline]
[<ffffffff81ac3aed>] __purge_vmap_area_lazy+0x28d/0x1690 mm/vmalloc.c:1697
CPU: 1 PID: 605 Comm: kworker/1:3 Not tainted 5.15.148-syzkaller-00718-g993bed180178 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Workqueue: events bpf_prog_free_deferred
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
dump_stack+0x15/0x17 lib/dump_stack.c:113
__schedule_bug+0x195/0x260 kernel/sched/core.c:5707
schedule_debug kernel/sched/core.c:5734 [inline]
__schedule+0xd19/0x1590 kernel/sched/core.c:6402
schedule+0x11f/0x1e0 kernel/sched/core.c:6595
schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:6654
mutex_optimistic_spin kernel/locking/mutex.c:521 [inline]
__mutex_lock_common kernel/locking/mutex.c:620 [inline]
__mutex_lock+0x5b5/0x1870 kernel/locking/mutex.c:755
__mutex_lock_slowpath+0xe/0x10 kernel/locking/mutex.c:1006
mutex_lock+0x135/0x1e0 kernel/locking/mutex.c:288
_vm_unmap_aliases+0x328/0x3b0 mm/vmalloc.c:2116
vm_remove_mappings mm/vmalloc.c:2611 [inline]
__vunmap+0x617/0x8f0 mm/vmalloc.c:2642
__vfree mm/vmalloc.c:2700 [inline]
vfree+0x7f/0xb0 mm/vmalloc.c:2731
module_memfree+0x17/0x30 kernel/module.c:2150
bpf_jit_free_exec+0x15/0x20 kernel/bpf/core.c:867
bpf_jit_binary_free kernel/bpf/core.c:914 [inline]
bpf_jit_free+0x98/0x240 kernel/bpf/core.c:927
bpf_prog_free_deferred+0x61e/0x730 kernel/bpf/core.c:2296
process_one_work+0x6bb/0xc10 kernel/workqueue.c:2325
worker_thread+0xad5/0x12a0 kernel/workqueue.c:2472
kthread+0x421/0x510 kernel/kthread.c:337
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298

syzbot

unread,
Jul 11, 2024, 6:46:07 AMJul 11
to syzkaller-a...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit 4b349c55bbd33c8918dbac13876d6842af571505
Author: Jiri Olsa <jo...@kernel.org>
Date: Sat Feb 17 12:13:20 2024 +0000

bpf: Do cleanup in bpf_bprintf_cleanup only when needed

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=13de3185980000
start commit: 5d96939590c0 Revert "hrtimer: Report offline hrtimer enque..
git tree: android13-5.15-lts
kernel config: https://syzkaller.appspot.com/x/.config?x=8b088e4698b12339
dashboard link: https://syzkaller.appspot.com/bug?extid=b7ad5586a2f214813a7d
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15e0c9ff180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13a4d897180000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: bpf: Do cleanup in bpf_bprintf_cleanup only when needed

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

syzbot

unread,
Aug 4, 2024, 7:29:04 PMAug 4
to syzkaller-a...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit 95b7476f6f68d725c474e3348e89436b0abde62a
Author: Jiri Olsa <jo...@kernel.org>
Date: Thu Dec 15 21:44:29 2022 +0000

bpf: Do cleanup in bpf_bprintf_cleanup only when needed

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=114a82d9980000
start commit: fa87a072a7fc ANDROID: GKI: Update honda symbol list for le..
git tree: android14-6.1
kernel config: https://syzkaller.appspot.com/x/.config?x=4a340f281ebc7608
dashboard link: https://syzkaller.appspot.com/bug?extid=d1cfbaac8abb553c109a
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=142ca8a7180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13b0b18b180000

syzbot

unread,
Aug 10, 2024, 5:53:14 PMAug 10
to syzkaller-a...@googlegroups.com
Auto-closing this bug as obsolete.
No recent activity, existing reproducers are no longer triggering the issue.

syzbot

unread,
Sep 2, 2024, 9:55:13 PMSep 2
to syzkaller-a...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages