syzbot


upstream test error: BUG: sleeping function called from invalid context in stack_depot_save

Status: fixed on 2021/11/10 00:50
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+e45919db2eab5e837646@syzkaller.appspotmail.com
Fix commit: 187ad460b841 mm/page_alloc: avoid page allocator recursion with pagesets.lock held
First crash: 1023d, last: 1011d
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] upstream test error: BUG: sleeping function called from invalid context in stack_depot_save 5 (7) 2021/10/26 14:27
[PATCH] mm: add GFP_ATOMIC flag after local_lock_irqsave 5 (5) 2021/07/06 03:13

Sample crash report:
BUG: sleeping function called from invalid context at mm/page_alloc.c:5167
in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 8414, name: syz-fuzzer
INFO: lockdep is turned off.
irq event stamp: 0
hardirqs last  enabled at (0): [<0000000000000000>] 0x0
hardirqs last disabled at (0): [<ffffffff814b18c7>] copy_process+0x1457/0x5b00 kernel/fork.c:2064
softirqs last  enabled at (0): [<ffffffff814b18eb>] copy_process+0x147b/0x5b00 kernel/fork.c:2065
softirqs last disabled at (0): [<0000000000000000>] 0x0
CPU: 0 PID: 8414 Comm: syz-fuzzer Tainted: G        W         5.14.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1ae/0x29f lib/dump_stack.c:105
 ___might_sleep+0x4e5/0x6b0 kernel/sched/core.c:9154
 prepare_alloc_pages+0x1c0/0x5a0 mm/page_alloc.c:5167
 __alloc_pages+0x14d/0x5f0 mm/page_alloc.c:5363
 stack_depot_save+0x361/0x490 lib/stackdepot.c:303
 save_stack+0xf9/0x1f0 mm/page_owner.c:120
 __set_page_owner+0x42/0x2f0 mm/page_owner.c:181
 prep_new_page mm/page_alloc.c:2433 [inline]
 __alloc_pages_bulk+0x9f2/0x1090 mm/page_alloc.c:5301
 alloc_pages_bulk_array_node include/linux/gfp.h:557 [inline]
 vm_area_alloc_pages mm/vmalloc.c:2793 [inline]
 __vmalloc_area_node mm/vmalloc.c:2863 [inline]
 __vmalloc_node_range+0x3ad/0x7f0 mm/vmalloc.c:2966
 __vmalloc_node mm/vmalloc.c:3015 [inline]
 vzalloc+0x75/0x80 mm/vmalloc.c:3085
 n_tty_open+0x19/0x150 drivers/tty/n_tty.c:1848
 tty_ldisc_open drivers/tty/tty_ldisc.c:449 [inline]
 tty_ldisc_setup+0xcf/0x3c0 drivers/tty/tty_ldisc.c:766
 tty_init_dev+0x271/0x4c0 drivers/tty/tty_io.c:1453
 tty_open_by_driver drivers/tty/tty_io.c:2098 [inline]
 tty_open+0x89a/0xdd0 drivers/tty/tty_io.c:2146
 chrdev_open+0x53b/0x5f0 fs/char_dev.c:414
 do_dentry_open+0x7cb/0x1020 fs/open.c:826
 do_open fs/namei.c:3374 [inline]
 path_openat+0x27e7/0x36b0 fs/namei.c:3507
 do_filp_open+0x253/0x4d0 fs/namei.c:3534
 do_sys_openat2+0x124/0x460 fs/open.c:1204
 do_sys_open fs/open.c:1220 [inline]
 __do_sys_openat fs/open.c:1236 [inline]
 __se_sys_openat fs/open.c:1231 [inline]
 __x64_sys_openat+0x243/0x290 fs/open.c:1231
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4af20a
Code: e8 3b 82 fb ff 48 8b 7c 24 10 48 8b 74 24 18 48 8b 54 24 20 4c 8b 54 24 28 4c 8b 44 24 30 4c 8b 4c 24 38 48 8b 44 24 08 0f 05 <48> 3d 01 f0 ff ff 76 20 48 c7 44 24 40 ff ff ff ff 48 c7 44 24 48
RSP: 002b:000000c0001db3f8 EFLAGS: 00000216 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 000000c00001c000 RCX: 00000000004af20a
RDX: 0000000000000000 RSI: 000000c000173aa0 RDI: ffffffffffffff9c
RBP: 000000c0001db470 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000216 R12: 00000000000001ab
R13: 00000000000001aa R14: 0000000000000200 R15: 000000c00029c3c0
can: request_module (can-proto-0) failed.
can: request_module (can-proto-0) failed.
can: request_module (can-proto-0) failed.

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/07/12 06:01 upstream e73f0f0ee754 a4869c92 .config console log report ci-upstream-kasan-gce-smack-root upstream test error: BUG: sleeping function called from invalid context in stack_depot_save
2021/07/02 11:18 upstream 3dbdb38e2869 658ebc66 .config console log report ci-upstream-kasan-gce upstream test error: BUG: sleeping function called from invalid context in stack_depot_save
2021/07/01 08:23 upstream dbe69e433722 658ebc66 .config console log report ci-upstream-kasan-gce upstream test error: BUG: sleeping function called from invalid context in stack_depot_save
2021/07/13 19:32 upstream 40226a3d96ef fa0594c3 .config console log report ci-upstream-kasan-gce-386 upstream test error: BUG: sleeping function called from invalid context in stack_depot_save
* Struck through repros no longer work on HEAD.