syzbot


linux-next boot error: BUG: sleeping function called from invalid context in cgroup_rstat_flush

Status: auto-closed as invalid on 2021/09/14 10:41
Subsystems: cgroups
[Documentation on labels]
Reported-by: syzbot+0e2d06632863e7ddb1c7@syzkaller.appspotmail.com
First crash: 1014d, last: 1014d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] linux-next boot error: BUG: sleeping function called from invalid context in cgroup_rstat_flush 0 (1) 2021/07/20 10:51

Sample crash report:
BUG: sleeping function called from invalid context at kernel/cgroup/rstat.c:200
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 39, name: kworker/u4:3
3 locks held by kworker/u4:3/39:
 #0: ffff888010869138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff888010869138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: atomic64_set include/asm-generic/atomic-instrumented.h:620 [inline]
 #0: ffff888010869138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: atomic_long_set include/asm-generic/atomic-long.h:41 [inline]
 #0: ffff888010869138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:617 [inline]
 #0: ffff888010869138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:644 [inline]
 #0: ffff888010869138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x871/0x1630 kernel/workqueue.c:2247
 #1: ffffc90000e2fdb0 (stats_flush_work){+.+.}-{0:0}, at: process_one_work+0x8a5/0x1630 kernel/workqueue.c:2251
 #2: ffffffff8bad45d8 (stats_flush_lock){+.+.}-{2:2}, at: spin_trylock include/linux/spinlock.h:369 [inline]
 #2: ffffffff8bad45d8 (stats_flush_lock){+.+.}-{2:2}, at: mem_cgroup_flush_stats mm/memcontrol.c:5358 [inline]
 #2: ffffffff8bad45d8 (stats_flush_lock){+.+.}-{2:2}, at: flush_memcg_stats_work+0xd/0x50 mm/memcontrol.c:5373
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 0 PID: 39 Comm: kworker/u4:3 Not tainted 5.14.0-rc1-next-20210716-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events_unbound flush_memcg_stats_work
Call Trace:
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:105
 ___might_sleep.cold+0x1f3/0x239 kernel/sched/core.c:9182
 cgroup_rstat_flush+0x1c/0x50 kernel/cgroup/rstat.c:200
 mem_cgroup_flush_stats mm/memcontrol.c:5361 [inline]
 mem_cgroup_flush_stats mm/memcontrol.c:5356 [inline]
 flush_memcg_stats_work+0x39/0x50 mm/memcontrol.c:5373
 process_one_work+0x98d/0x1630 kernel/workqueue.c:2276
 worker_thread+0x658/0x11f0 kernel/workqueue.c:2422
 kthread+0x3e5/0x4d0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/07/16 10:40 linux-next 6e235535ce82 f115ae98 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: BUG: sleeping function called from invalid context in cgroup_rstat_flush
2021/07/16 10:40 linux-next 6e235535ce82 f115ae98 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: BUG: sleeping function called from invalid context in cgroup_rstat_flush
2021/07/16 10:40 linux-next 6e235535ce82 f115ae98 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: BUG: sleeping function called from invalid context in cgroup_rstat_flush
* Struck through repros no longer work on HEAD.