syzbot


kernel panic: corrupted stack end in loop_workfn

Status: internal: reported on 2022/04/22 18:16
Reported-by: syzbot+@syzkaller.appspotmail.com
Fix commit: b81d591386c3 riscv: Increase stack size under KASAN
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 67d, last: 67d

Sample crash report:
Kernel panic - not syncing: corrupted stack end detected inside scheduler
CPU: 0 PID: 3098 Comm: kworker/u4:1 Not tainted 5.17.0-rc1-syzkaller-00002-g0966d385830d #0
Hardware name: riscv-virtio,qemu (DT)
Workqueue: loop0 loop_workfn
Call Trace:
[<ffffffff8000a228>] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:113
[<ffffffff831668cc>] show_stack+0x34/0x40 arch/riscv/kernel/stacktrace.c:119
[<ffffffff831756ba>] __dump_stack lib/dump_stack.c:88 [inline]
[<ffffffff831756ba>] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:106
[<ffffffff83175742>] dump_stack+0x1c/0x24 lib/dump_stack.c:113
[<ffffffff83166fa8>] panic+0x24a/0x634 kernel/panic.c:233
[<ffffffff831a688a>] schedule_debug kernel/sched/core.c:5541 [inline]
[<ffffffff831a688a>] schedule+0x0/0x14c kernel/sched/core.c:6187
[<ffffffff831a6b00>] preempt_schedule_common+0x4e/0xde kernel/sched/core.c:6462
[<ffffffff831a6bc4>] preempt_schedule+0x34/0x36 kernel/sched/core.c:6487
[<ffffffff831a9556>] __mutex_lock_common kernel/locking/mutex.c:608 [inline]
[<ffffffff831a9556>] __mutex_lock+0x7c6/0xade kernel/locking/mutex.c:733
[<ffffffff831a9882>] mutex_lock_nested+0x14/0x1c kernel/locking/mutex.c:785
[<ffffffff8073b9b4>] ext4_mb_group_or_file fs/ext4/mballoc.c:5176 [inline]
[<ffffffff8073b9b4>] ext4_mb_initialize_context+0x468/0x588 fs/ext4/mballoc.c:5219
[<ffffffff80752534>] ext4_mb_new_blocks+0x47e/0x3228 fs/ext4/mballoc.c:5565
[<ffffffff806ea944>] ext4_ext_map_blocks+0x1930/0x3e86 fs/ext4/extents.c:4282
[<ffffffff8071fc44>] ext4_map_blocks+0x4fe/0xe64 fs/ext4/inode.c:638
[<ffffffff80721810>] ext4_iomap_alloc fs/ext4/inode.c:3354 [inline]
[<ffffffff80721810>] ext4_iomap_begin+0x370/0x56e fs/ext4/inode.c:3404
[<ffffffff80612efc>] iomap_iter+0x3be/0xcf6 fs/iomap/iter.c:74
[<ffffffff8061e61e>] __iomap_dio_rw+0x4a2/0x121a fs/iomap/direct-io.c:589
[<ffffffff8061f3ce>] iomap_dio_rw+0x38/0x94 fs/iomap/direct-io.c:680
[<ffffffff806fc8f6>] ext4_dio_write_iter fs/ext4/file.c:564 [inline]
[<ffffffff806fc8f6>] ext4_file_write_iter+0xa3c/0xda2 fs/ext4/file.c:675
[<ffffffff8143d46a>] call_write_iter include/linux/fs.h:2074 [inline]
[<ffffffff8143d46a>] lo_rw_aio+0x57a/0x6c0 drivers/block/loop.c:451
[<ffffffff8144072c>] do_req_filebacked drivers/block/loop.c:497 [inline]
[<ffffffff8144072c>] loop_handle_cmd drivers/block/loop.c:1853 [inline]
[<ffffffff8144072c>] loop_process_work+0x838/0x176e drivers/block/loop.c:1893
[<ffffffff814416bc>] loop_workfn+0x2e/0x38 drivers/block/loop.c:1917
[<ffffffff80093b44>] process_one_work+0x654/0xffe kernel/workqueue.c:2307
[<ffffffff8009484e>] worker_thread+0x360/0x8fa kernel/workqueue.c:2454
[<ffffffff800a7f58>] kthread+0x19e/0x1fa kernel/kthread.c:377
[<ffffffff80005724>] ret_from_exception+0x0/0x10
SMP: stopping secondary CPUs
Rebooting in 86400 seconds..

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-qemu2-riscv64 2022/04/22 18:15 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d 131df97d .config log report info kernel panic: corrupted stack end in loop_workfn