syzbot


BUG: sleeping function called from invalid context in stack_depot_save

Status: fixed on 2021/11/10 00:50
Reported-by: syzbot+b07d8440edb5f8988eea@syzkaller.appspotmail.com
Fix commit: 187ad460b841 mm/page_alloc: avoid page allocator recursion with pagesets.lock held
First crash: 578d, last: 545d

Cause bisection: introduced by (bisect log) [merge commit]:
commit 36824f198c621cebeb22966b5e244378fa341295
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Mon Jun 28 22:40:51 2021 +0000

  Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Crash: BUG: sleeping function called from invalid context in lock_sock_nested (log)
Repro: syz .config
duplicates (5):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
net test error: BUG: sleeping function called from invalid context in stack_depot_save 3 559d 565d 0/24 closed as dup on 2021/07/28 13:57
linux-next test error: BUG: sleeping function called from invalid context in stack_depot_save 2 570d 567d 0/24 closed as dup on 2021/07/28 13:56
upstream boot error: BUG: sleeping function called from invalid context in stack_depot_save 69 567d 572d 0/24 closed as dup on 2021/07/28 13:59
bpf-next test error: BUG: sleeping function called from invalid context in stack_depot_save 1 557d 553d 0/24 closed as dup on 2021/07/28 13:52
net boot error: BUG: sleeping function called from invalid context in stack_depot_save 5 575d 572d 0/24 closed as dup on 2021/07/28 13:58
Last patch testing requests:
Created Duration User Patch Repo Result
2021/07/06 01:51 19m wangqing@vivo.com patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 3dbdb38e OK
2021/07/05 14:03 17m wangqing@vivo.com patch upstream error

Sample crash report:
BUG: sleeping function called from invalid context at mm/page_alloc.c:5179
in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 9774, name: kworker/1:4
INFO: lockdep is turned off.
irq event stamp: 0
hardirqs last  enabled at (0): [<0000000000000000>] 0x0
hardirqs last disabled at (0): [<ffffffff81433b3b>] copy_process+0x1e1b/0x74c0 kernel/fork.c:2061
softirqs last  enabled at (0): [<ffffffff81433b7c>] copy_process+0x1e5c/0x74c0 kernel/fork.c:2065
softirqs last disabled at (0): [<0000000000000000>] 0x0
CPU: 1 PID: 9774 Comm: kworker/1:4 Tainted: G        W         5.13.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events pcpu_balance_workfn
Call Trace:
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:96
 ___might_sleep.cold+0x1f1/0x237 kernel/sched/core.c:9153
 prepare_alloc_pages+0x3da/0x580 mm/page_alloc.c:5179
 __alloc_pages+0x12f/0x500 mm/page_alloc.c:5375
 alloc_pages+0x18c/0x2a0 mm/mempolicy.c:2272
 stack_depot_save+0x39d/0x4e0 lib/stackdepot.c:303
 save_stack+0x15e/0x1e0 mm/page_owner.c:120
 __set_page_owner+0x50/0x290 mm/page_owner.c:181
 prep_new_page mm/page_alloc.c:2445 [inline]
 __alloc_pages_bulk+0x8b9/0x1870 mm/page_alloc.c:5313
 alloc_pages_bulk_array_node include/linux/gfp.h:557 [inline]
 vm_area_alloc_pages mm/vmalloc.c:2775 [inline]
 __vmalloc_area_node mm/vmalloc.c:2845 [inline]
 __vmalloc_node_range+0x39d/0x960 mm/vmalloc.c:2947
 __vmalloc_node mm/vmalloc.c:2996 [inline]
 __vmalloc+0x69/0x80 mm/vmalloc.c:3010
 pcpu_mem_zalloc mm/percpu.c:517 [inline]
 pcpu_mem_zalloc+0x51/0xa0 mm/percpu.c:509
 pcpu_alloc_chunk mm/percpu.c:1460 [inline]
 pcpu_create_chunk+0x123/0x720 mm/percpu-vm.c:337
 pcpu_balance_populated mm/percpu.c:2111 [inline]
 pcpu_balance_workfn+0xb13/0xd10 mm/percpu.c:2232
 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 (8490):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kasan-gce-selinux-root 2021/07/05 20:58 upstream 3dbdb38e2869 55aa55c2 .config console log report syz C BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/02 20:27 upstream 3dbdb38e2869 55aa55c2 .config console log report syz C BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-386 2021/07/15 16:52 upstream 8096acd7442e b9a2f64e .config console log report syz C BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/15 23:15 upstream 8096acd7442e b9a2f64e .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-root 2021/07/15 21:55 upstream 8096acd7442e b9a2f64e .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/15 21:42 upstream 8096acd7442e b9a2f64e .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-smack-root 2021/07/15 21:24 upstream 8096acd7442e b9a2f64e .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/15 20:13 upstream 8096acd7442e b9a2f64e .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/15 17:18 upstream 8096acd7442e b9a2f64e .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce 2021/07/15 14:08 upstream 8096acd7442e b9a2f64e .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/15 13:16 upstream 8096acd7442e b9a2f64e .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-root 2021/07/15 10:24 upstream 8096acd7442e b9a2f64e .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/15 01:54 upstream 8096acd7442e 94e0b707 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/14 23:26 upstream 8096acd7442e 94e0b707 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/14 14:45 upstream 40226a3d96ef 484502bd .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/14 00:20 upstream 40226a3d96ef fa0594c3 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/13 12:01 upstream 7fef2edf7cc7 f415556d .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce 2021/07/13 07:48 upstream 7fef2edf7cc7 f415556d .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/13 05:15 upstream 7fef2edf7cc7 f415556d .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce 2021/07/13 03:20 upstream 7fef2edf7cc7 f415556d .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce 2021/07/13 02:44 upstream 7fef2edf7cc7 f415556d .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/13 02:31 upstream 7fef2edf7cc7 f415556d .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-root 2021/07/13 02:09 upstream 7fef2edf7cc7 f415556d .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/12 00:06 upstream 98f7fdced2e0 8f5a7b8c .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/11 14:33 upstream 3dbdb38e2869 8f5a7b8c .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/11 12:00 upstream 3dbdb38e2869 8f5a7b8c .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/11 08:52 upstream 3dbdb38e2869 8f5a7b8c .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/07/11 04:31 upstream 3dbdb38e2869 8f5a7b8c .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-selinux-root 2021/06/30 12:51 upstream 007b350a5875 84fd4c77 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-386 2021/07/14 03:08 upstream 40226a3d96ef fa0594c3 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-386 2021/07/14 02:42 upstream 40226a3d96ef fa0594c3 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-386 2021/07/13 23:54 upstream 40226a3d96ef fa0594c3 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-386 2021/07/11 04:54 upstream 3dbdb38e2869 8f5a7b8c .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-net-this-kasan-gce 2021/07/21 19:39 net 161dcc024288 29c3f20f .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-net-this-kasan-gce 2021/07/21 10:54 net 09cfae9f13d5 1b201b48 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-net-this-kasan-gce 2021/07/16 05:30 net 65875073eddd f115ae98 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/07/27 13:12 bpf-next 793eccae89bb fd511809 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/07/22 11:02 bpf-next 807b8f0e24e6 29c3f20f .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-net-kasan-gce 2021/07/18 19:18 net-next 0d6835ffe50c f115ae98 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci2-upstream-usb 2021/07/18 03:00 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 97db1b081e12 f115ae98 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-linux-next-kasan-gce-root 2021/07/17 14:51 linux-next c1a6d08348fc f115ae98 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-linux-next-kasan-gce-root 2021/07/16 20:10 linux-next c1a6d08348fc f115ae98 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-linux-next-kasan-gce-root 2021/07/16 09:28 linux-next c1a6d08348fc f115ae98 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci2-upstream-usb 2021/07/16 02:10 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 97db1b081e12 f115ae98 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-linux-next-kasan-gce-root 2021/07/15 21:17 linux-next c1a6d08348fc b9a2f64e .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-linux-next-kasan-gce-root 2021/07/14 15:27 linux-next c0d438dbc0b7 484502bd .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci2-upstream-usb 2021/07/12 11:05 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing e73f0f0ee754 a4869c92 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-linux-next-kasan-gce-root 2021/07/12 09:03 linux-next db503865b9ba a4869c92 .config console log report syz BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-kasan-gce-root 2021/06/30 08:07 upstream 007b350a5875 84fd4c77 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-kasan-gce 2021/07/29 10:15 bpf 2039f26f3aca 9a4781d4 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-net-this-kasan-gce 2021/07/23 00:02 net e40cba9490ba 302e51de .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/02 22:17 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/02 20:45 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/02 19:28 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/02 18:17 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/02 18:13 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/02 16:58 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/02 14:10 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/02 12:49 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/02 11:38 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/02 10:16 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/02 09:14 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/02 07:18 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/02 06:15 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/02 04:42 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/02 03:32 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/02 03:26 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/02 01:36 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/01 23:22 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/01 21:35 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/01 20:29 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/01 18:07 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/01 17:03 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/01 16:58 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/01 15:15 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/01 13:54 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/01 11:49 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/01 10:33 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/01 08:41 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/01 03:23 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/01 01:34 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/08/01 00:15 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/07/31 20:46 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/07/31 17:59 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/07/31 16:37 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/07/31 15:29 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/07/31 14:11 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/07/31 12:59 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/07/31 11:05 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/07/31 10:05 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/07/31 09:03 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/07/31 08:03 bpf-next ab0720ce227c 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/07/31 05:51 bpf-next f309b4ba989d 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/07/31 04:17 bpf-next f309b4ba989d 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/07/31 02:59 bpf-next f309b4ba989d 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-bpf-next-kasan-gce 2021/07/31 01:28 bpf-next f309b4ba989d 6c236867 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-net-kasan-gce 2021/07/24 04:30 net-next 090597b4a9c1 bc5f1d88 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci2-upstream-usb 2021/07/26 07:16 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 8e6cb5d27e82 fd511809 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
ci-upstream-linux-next-kasan-gce-root 2021/07/21 01:09 linux-next c1a6d08348fc 1b201b48 .config console log report info BUG: sleeping function called from invalid context in stack_depot_save
* Struck through repros no longer work on HEAD.