syzbot


BUG: sleeping function called from invalid context in __alloc_pages_nodemask

Status: closed as invalid on 2020/03/07 21:22
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+4925d60532bf4c399608@syzkaller.appspotmail.com
First crash: 1819d, last: 1796d
Cause bisection: introduced by (bisect log) :
commit ab92d68fc22f9afab480153bd82a20f6e2533769
Author: Taehee Yoo <ap420073@gmail.com>
Date: Mon Oct 21 18:47:51 2019 +0000

  net: core: add generic lockdep keys

Crash: BUG: MAX_LOCKDEP_KEYS too low! (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
BUG: sleeping function called from invalid context in __alloc_pages_nodemask 3 (7) 2019/12/02 04:07
Re: BUG: sleeping function called from invalid context in __alloc_pages_nodemask 2 (2) 2019/11/30 11:50

Sample crash report:
BUG: sleeping function called from invalid context at mm/page_alloc.c:4681
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 2948, name: kworker/0:2
4 locks held by kworker/0:2/2948:
 #0: ffff8880aa026d28 ((wq_completion)events){+.+.}, at: __write_once_size include/linux/compiler.h:247 [inline]
 #0: ffff8880aa026d28 ((wq_completion)events){+.+.}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff8880aa026d28 ((wq_completion)events){+.+.}, at: atomic64_set include/asm-generic/atomic-instrumented.h:868 [inline]
 #0: ffff8880aa026d28 ((wq_completion)events){+.+.}, at: atomic_long_set include/asm-generic/atomic-long.h:40 [inline]
 #0: ffff8880aa026d28 ((wq_completion)events){+.+.}, at: set_work_data kernel/workqueue.c:615 [inline]
 #0: ffff8880aa026d28 ((wq_completion)events){+.+.}, at: set_work_pool_and_clear_pending kernel/workqueue.c:642 [inline]
 #0: ffff8880aa026d28 ((wq_completion)events){+.+.}, at: process_one_work+0x88b/0x1740 kernel/workqueue.c:2235
 #1: ffffc90008317dc0 (pcpu_balance_work){+.+.}, at: process_one_work+0x8c1/0x1740 kernel/workqueue.c:2239
 #2: ffffffff8983ff20 (pcpu_alloc_mutex){+.+.}, at: pcpu_balance_workfn+0xb7/0x1310 mm/percpu.c:1845
 #3: ffffffff89851b18 (vmap_area_lock){+.+.}, at: spin_lock include/linux/spinlock.h:338 [inline]
 #3: ffffffff89851b18 (vmap_area_lock){+.+.}, at: pcpu_get_vm_areas+0x3b27/0x3f00 mm/vmalloc.c:3431
Preemption disabled at:
[<ffffffff81a89ce7>] spin_lock include/linux/spinlock.h:338 [inline]
[<ffffffff81a89ce7>] pcpu_get_vm_areas+0x3b27/0x3f00 mm/vmalloc.c:3431
CPU: 0 PID: 2948 Comm: kworker/0:2 Not tainted 5.4.0-next-20191129-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:77 [inline]
 dump_stack+0x197/0x210 lib/dump_stack.c:118
 ___might_sleep.cold+0x1fb/0x23e kernel/sched/core.c:6800
 __might_sleep+0x95/0x190 kernel/sched/core.c:6753
 prepare_alloc_pages mm/page_alloc.c:4681 [inline]
 __alloc_pages_nodemask+0x523/0x910 mm/page_alloc.c:4730
 alloc_pages_current+0x107/0x210 mm/mempolicy.c:2211
 alloc_pages include/linux/gfp.h:532 [inline]
 __get_free_pages+0xc/0x40 mm/page_alloc.c:4786
 kasan_populate_vmalloc_pte mm/kasan/common.c:762 [inline]
 kasan_populate_vmalloc_pte+0x2f/0x1c0 mm/kasan/common.c:753
 apply_to_pte_range mm/memory.c:2041 [inline]
 apply_to_pmd_range mm/memory.c:2068 [inline]
 apply_to_pud_range mm/memory.c:2088 [inline]
 apply_to_p4d_range mm/memory.c:2108 [inline]
 apply_to_page_range+0x445/0x700 mm/memory.c:2133
 kasan_populate_vmalloc+0x68/0x90 mm/kasan/common.c:791
 pcpu_get_vm_areas+0x3c77/0x3f00 mm/vmalloc.c:3439
 pcpu_create_chunk+0x24e/0x7f0 mm/percpu-vm.c:340
 pcpu_balance_workfn+0xf1b/0x1310 mm/percpu.c:1934
 process_one_work+0x9af/0x1740 kernel/workqueue.c:2264
 worker_thread+0x98/0xe40 kernel/workqueue.c:2410
 kthread+0x361/0x430 kernel/kthread.c:255
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352

Crashes (6299):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/12/01 16:56 linux-next 419593dad843 a76bf83f .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/12/01 16:32 linux-next 419593dad843 a76bf83f .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/12/01 15:10 linux-next 419593dad843 a76bf83f .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/12/01 21:09 linux-next 419593dad843 a76bf83f .config console log report syz ci-upstream-linux-next-kasan-gce-root
2019/12/01 11:21 linux-next 419593dad843 a76bf83f .config console log report syz ci-upstream-linux-next-kasan-gce-root
2019/12/18 02:48 upstream 9065e0636036 a6bc9c88 .config console log report ci-upstream-kasan-gce
2019/12/12 15:00 upstream 687dec9b9459 d973f528 .config console log report ci-upstream-kasan-gce
2019/12/12 07:06 upstream 687dec9b9459 d973f528 .config console log report ci-upstream-kasan-gce
2019/12/11 16:59 upstream 6794862a16ef 101194eb .config console log report ci-upstream-kasan-gce-root
2019/12/09 04:24 upstream 9455d25f4e3b 1508f453 .config console log report ci-upstream-kasan-gce-root
2019/12/09 02:21 upstream 9455d25f4e3b 1508f453 .config console log report ci-upstream-kasan-gce-selinux-root
2019/12/04 22:10 upstream 63de37476ebd b2088328 .config console log report ci-upstream-kasan-gce
2019/12/08 06:22 upstream ad910e36da4c 1508f453 .config console log report ci-upstream-kasan-gce-386
2019/12/22 14:46 bpf 0fd260056ef8 8b967267 .config console log report ci-upstream-bpf-kasan-gce
2019/12/13 02:57 bpf fe3300897cbf 08003f64 .config console log report ci-upstream-bpf-kasan-gce
2019/12/08 12:50 bpf ae72555b4104 1508f453 .config console log report ci-upstream-bpf-kasan-gce
2019/12/04 19:29 bpf 040b5cfbcefa b2088328 .config console log report ci-upstream-bpf-kasan-gce
2019/12/20 20:21 net-next-old 5080832627b6 bc586918 .config console log report ci-upstream-net-kasan-gce
2019/12/10 19:34 bpf-next e7096c131e51 5a5826a1 .config console log report ci-upstream-bpf-next-kasan-gce
2019/12/05 05:29 net-next-old 596cf45cbf6e b2088328 .config console log report ci-upstream-net-kasan-gce
2019/12/03 11:52 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 11:26 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 10:47 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 10:07 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 09:43 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 09:11 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 08:39 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 08:15 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 07:51 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 07:27 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 06:48 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 06:23 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 05:57 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 05:32 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 05:10 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 04:54 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 04:38 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 04:23 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 04:08 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 03:51 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 03:34 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 03:20 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 03:02 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 02:30 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 02:13 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 02:00 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 01:47 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 01:35 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 01:22 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 01:10 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 00:57 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 00:43 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 00:31 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 00:18 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/03 00:05 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/02 23:53 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/02 23:40 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/02 23:28 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/02 23:15 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/12/02 23:04 linux-next c5db92909bed ab342da3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/11/30 01:41 linux-next 419593dad843 3a75be00 .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.