syzbot


kernel panic: corrupted stack end in shmem_fault

Status: fixed on 2023/02/24 13:50
Subsystems: cgroups mm
[Documentation on labels]
Fix commit: b81d591386c3 riscv: Increase stack size under KASAN
First crash: 586d, last: 456d

Sample crash report:
Kernel panic - not syncing: corrupted stack end detected inside scheduler
CPU: 0 PID: 3708 Comm: syz-executor.0 Not tainted 5.17.0-rc1-syzkaller-00002-g0966d385830d #0
Hardware name: riscv-virtio,qemu (DT)
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
[<ffffffff831a6c62>] preempt_schedule_notrace+0x9c/0x19a kernel/sched/core.c:6541
[<ffffffff8010f014>] rcu_read_unlock_sched_notrace include/linux/rcupdate.h:816 [inline]
[<ffffffff8010f014>] trace_lock_acquire+0xd6/0x1fc include/trace/events/lock.h:13
[<ffffffff801167fe>] lock_acquire+0x28/0x6a kernel/locking/lockdep.c:5610
[<ffffffff80488c6e>] rcu_lock_acquire include/linux/rcupdate.h:268 [inline]
[<ffffffff80488c6e>] rcu_read_lock include/linux/rcupdate.h:694 [inline]
[<ffffffff80488c6e>] percpu_ref_get_many+0x3e/0x178 include/linux/percpu-refcount.h:202
[<ffffffff8048f4f4>] percpu_ref_get include/linux/percpu-refcount.h:222 [inline]
[<ffffffff8048f4f4>] css_get include/linux/cgroup.h:324 [inline]
[<ffffffff8048f4f4>] charge_memcg+0xd4/0x124 mm/memcontrol.c:6691
[<ffffffff80493d00>] __mem_cgroup_charge+0x24/0x5c mm/memcontrol.c:6708
[<ffffffff803896ec>] mem_cgroup_charge include/linux/memcontrol.h:667 [inline]
[<ffffffff803896ec>] shmem_add_to_page_cache+0x570/0x970 mm/shmem.c:715
[<ffffffff8038d376>] shmem_getpage_gfp+0x73e/0x13ea mm/shmem.c:1902
[<ffffffff8038e136>] shmem_fault+0x114/0x3fe mm/shmem.c:2080
[<ffffffff803cdfc0>] __do_fault+0x8c/0x46c mm/memory.c:3868
[<ffffffff803d83be>] do_read_fault mm/memory.c:4183 [inline]
[<ffffffff803d83be>] do_fault mm/memory.c:4312 [inline]
[<ffffffff803d83be>] handle_pte_fault mm/memory.c:4570 [inline]
[<ffffffff803d83be>] __handle_mm_fault+0x10fe/0x23a4 mm/memory.c:4705
[<ffffffff803d98fa>] handle_mm_fault+0x296/0x674 mm/memory.c:4803
[<ffffffff803c5c8c>] faultin_page mm/gup.c:944 [inline]
[<ffffffff803c5c8c>] __get_user_pages+0x444/0x7b4 mm/gup.c:1165
[<ffffffff803c9dba>] __get_user_pages_locked mm/gup.c:1350 [inline]
[<ffffffff803c9dba>] get_dump_page+0x148/0x74e mm/gup.c:1827
[<ffffffff8060f526>] dump_user_range+0x24c/0x2f0 fs/coredump.c:867
[<ffffffff806043fe>] elf_core_dump+0x1aa6/0x2194 fs/binfmt_elf.c:2290
[<ffffffff8060e7dc>] do_coredump+0x15da/0x20d8 fs/coredump.c:749
[<ffffffff8007c654>] get_signal+0x7f6/0x1754 kernel/signal.c:2848
[<ffffffff80008498>] do_signal arch/riscv/kernel/signal.c:271 [inline]
[<ffffffff80008498>] do_notify_resume+0x11a/0xa56 arch/riscv/kernel/signal.c:317
[<ffffffff80005724>] ret_from_exception+0x0/0x10
SMP: stopping secondary CPUs
Rebooting in 86400 seconds..

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/17 12:31 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d 3e7039f4 .config console log report info ci-qemu2-riscv64 kernel panic: corrupted stack end in shmem_fault
2023/01/12 08:34 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d 96166539 .config console log report info ci-qemu2-riscv64 kernel panic: corrupted stack end in shmem_fault
2022/11/21 16:18 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d f9a97739 .config console log report info ci-qemu2-riscv64 kernel panic: corrupted stack end in shmem_fault
2022/10/28 09:23 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d 8168b69e .config console log report info ci-qemu2-riscv64 kernel panic: corrupted stack end in shmem_fault
2022/10/09 20:55 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d aea5da89 .config console log report info ci-qemu2-riscv64 kernel panic: corrupted stack end in shmem_fault
* Struck through repros no longer work on HEAD.