FS: sel=0x0018, attr=0x00093, limit=0x000fffff, base=0x0000000000000000 GS: sel=0x0018, attr=0x00093, limit=0x000fffff, base=0x0000000000000000 GDTR: limit=0x000007ff, base=0x0000000000001000 kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 13873 Comm: syz-executor0 Not tainted 4.19.0-rc4+ #26 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__fire_sched_out_preempt_notifiers kernel/sched/core.c:2497 [inline] RIP: 0010:fire_sched_out_preempt_notifiers kernel/sched/core.c:2505 [inline] RIP: 0010:prepare_task_switch kernel/sched/core.c:2611 [inline] RIP: 0010:context_switch kernel/sched/core.c:2790 [inline] RIP: 0010:__schedule+0xfb7/0x1ed0 kernel/sched/core.c:3473 Code: 89 e0 48 c1 e8 03 42 80 3c 28 00 0f 85 b9 09 00 00 4d 8b 24 24 4d 85 e4 0f 84 0b f7 ff ff 49 8d 7c 24 10 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 74 a4 e8 8d ed 03 fa eb 9d 48 89 de 4c 89 ff e8 d0 RSP: 0000:ffff88018ac1f488 EFLAGS: 00010806 RAX: 1bd5a00000000022 RBX: ffff8801976aa600 RCX: 1ffff10031d4ca17 RDX: 0000000040000002 RSI: 0000000000000000 RDI: dead000000000110 RBP: ffff88018ac1f660 R08: ffff880190a4c200 R09: fffff52001e39e47 R10: fffff52001e39e47 R11: ffffc9000f1cf23b R12: dead000000000100 R13: dffffc0000000000 R14: ffff8801daf2cb40 R15: ffff880190a4c200 FS: 00007fcdf7650700(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020fe9e00 CR3: 00000001d89e2000 CR4: 00000000001426e0 Call Trace: preempt_schedule_irq+0x87/0x110 kernel/sched/core.c:3700 retint_kernel+0x1b/0x2d RIP: 0010:__sanitizer_cov_trace_cmp4+0x11/0x20 kernel/kcov.c:162 Code: bf 02 00 00 00 48 89 e5 48 8b 4d 08 e8 08 ff ff ff 5d c3 66 0f 1f 44 00 00 55 89 f2 89 fe bf 04 00 00 00 48 89 e5 48 8b 4d 08 ea fe ff ff 5d c3 0f 1f 84 00 00 00 00 00 55 48 89 f2 48 89 fe RSP: 0000:ffff88018ac1f758 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff13 RAX: 0000000000040000 RBX: 0000000000000016 RCX: ffffffff81b36263 RDX: 0000000000000016 RSI: 00000000000001d2 RDI: 0000000000000004 RBP: ffff88018ac1f758 R08: ffff880190a4c200 R09: 0000000000000000 R10: ffffed003b5e4732 R11: ffff8801daf23993 R12: 0000000020e00000 R13: ffffea0005f48000 R14: 0000000000000017 R15: 0000000020e16000 process_huge_page mm/memory.c:4616 [inline] clear_huge_page+0x1e3/0x490 mm/memory.c:4669 __do_huge_pmd_anonymous_page mm/huge_memory.c:567 [inline] do_huge_pmd_anonymous_page+0x854/0x17e0 mm/huge_memory.c:725 create_huge_pmd mm/memory.c:3874 [inline] __handle_mm_fault+0x3880/0x53e0 mm/memory.c:4078 handle_mm_fault+0x54f/0xc70 mm/memory.c:4144 __do_page_fault+0x67d/0xed0 arch/x86/mm/fault.c:1395 do_page_fault+0xf2/0x7e0 arch/x86/mm/fault.c:1470 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1161 RIP: 0033:0x4087a1 Code: 8b 84 24 d0 04 00 00 48 89 41 20 8b 84 24 d8 04 00 00 89 41 28 e9 02 ef ff ff 48 8b 8c 24 a8 00 00 00 48 8b 84 24 b0 04 00 00 <48> 89 01 48 8b 84 24 b8 04 00 00 48 89 41 08 48 8b 84 24 c0 04 00 RSP: 002b:00007fcdf764e0a0 EFLAGS: 00010246 RAX: 0f8000180f800000 RBX: 0000000000000008 RCX: 0000000020fe9e00 RDX: e0611db649718746 RSI: 0000000000000000 RDI: 00007fcdf7650608 RBP: 0000000000000000 R08: 0000000000000010 R09: 0000000000000018 R10: 0000000000000018 R11: 0000000000000018 R12: 0000000000000007 R13: 0000000020fe6000 R14: 00000000004c49c2 R15: 0000000000000000 Modules linked in: ====================================================== WARNING: possible circular locking dependency detected 4.19.0-rc4+ #26 Not tainted ------------------------------------------------------ syz-executor0/13873 is trying to acquire lock: 00000000081fa829 ((console_sem).lock){-.-.}, at: down_trylock+0x13/0x70 kernel/locking/semaphore.c:136 but task is already holding lock: 000000008797e1aa (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1821 [inline] 000000008797e1aa (&rq->lock){-.-.}, at: __schedule+0x236/0x1ed0 kernel/sched/core.c:3411 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&rq->lock){-.-.}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2d/0x40 kernel/locking/spinlock.c:144 rq_lock kernel/sched/sched.h:1821 [inline] task_fork_fair+0xb0/0x6d0 kernel/sched/fair.c:9581 sched_fork+0x443/0xba0 kernel/sched/core.c:2353 copy_process+0x2586/0x8780 kernel/fork.c:1839 _do_fork+0x1cb/0x11d0 kernel/fork.c:2166 kernel_thread+0x34/0x40 kernel/fork.c:2225 rest_init+0x22/0xe5 init/main.c:408 start_kernel+0x8f4/0x92f init/main.c:739 x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:452 x86_64_start_kernel+0x76/0x79 arch/x86/kernel/head64.c:433 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:242 -> #1 (&p->pi_lock){-.-.}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x99/0xd0 kernel/locking/spinlock.c:152 try_to_wake_up+0xd2/0x12f0 kernel/sched/core.c:1960 wake_up_process+0x10/0x20 kernel/sched/core.c:2123 __up.isra.1+0x1c0/0x2a0 kernel/locking/semaphore.c:262 up+0x13c/0x1c0 kernel/locking/semaphore.c:187 __up_console_sem+0xbe/0x1b0 kernel/printk/printk.c:244 console_unlock+0x814/0x1160 kernel/printk/printk.c:2427 vprintk_emit+0x33d/0x930 kernel/printk/printk.c:1922 vprintk_default+0x28/0x30 kernel/printk/printk.c:1963 vprintk_func+0x7e/0x181 kernel/printk/printk_safe.c:398 printk+0xa7/0xcf kernel/printk/printk.c:1996 kauditd_printk_skb kernel/audit.c:546 [inline] kauditd_hold_skb.cold.21+0x3f/0x4e kernel/audit.c:579 kauditd_send_queue+0x13b/0x180 kernel/audit.c:742 kauditd_thread+0x7d2/0xb60 kernel/audit.c:868 kthread+0x35a/0x420 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:413 -> #0 ((console_sem).lock){-.-.}: lock_acquire+0x1ed/0x520 kernel/locking/lockdep.c:3900 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x99/0xd0 kernel/locking/spinlock.c:152 down_trylock+0x13/0x70 kernel/locking/semaphore.c:136 __down_trylock_console_sem+0xae/0x200 kernel/printk/printk.c:227 console_trylock+0x15/0xa0 kernel/printk/printk.c:2245 console_trylock_spinning kernel/printk/printk.c:1649 [inline] vprintk_emit+0x322/0x930 kernel/printk/printk.c:1921 vprintk_default+0x28/0x30 kernel/printk/printk.c:1963 vprintk_func+0x7e/0x181 kernel/printk/printk_safe.c:398 printk+0xa7/0xcf kernel/printk/printk.c:1996 kasan_die_handler.cold.22+0x11/0x30 arch/x86/mm/kasan_init_64.c:251 notifier_call_chain+0x17e/0x380 kernel/notifier.c:93 __atomic_notifier_call_chain kernel/notifier.c:183 [inline] atomic_notifier_call_chain+0x96/0x190 kernel/notifier.c:193 notify_die+0x1bd/0x2d0 kernel/notifier.c:549 do_general_protection+0x248/0x2f0 arch/x86/kernel/traps.c:559 general_protection+0x1e/0x30 arch/x86/entry/entry_64.S:1160 __fire_sched_out_preempt_notifiers kernel/sched/core.c:2497 [inline] fire_sched_out_preempt_notifiers kernel/sched/core.c:2505 [inline] prepare_task_switch kernel/sched/core.c:2611 [inline] context_switch kernel/sched/core.c:2790 [inline] __schedule+0xfb7/0x1ed0 kernel/sched/core.c:3473 preempt_schedule_irq+0x87/0x110 kernel/sched/core.c:3700 retint_kernel+0x1b/0x2d __sanitizer_cov_trace_cmp4+0x11/0x20 kernel/kcov.c:162 process_huge_page mm/memory.c:4616 [inline] clear_huge_page+0x1e3/0x490 mm/memory.c:4669 __do_huge_pmd_anonymous_page mm/huge_memory.c:567 [inline] do_huge_pmd_anonymous_page+0x854/0x17e0 mm/huge_memory.c:725 create_huge_pmd mm/memory.c:3874 [inline] __handle_mm_fault+0x3880/0x53e0 mm/memory.c:4078 handle_mm_fault+0x54f/0xc70 mm/memory.c:4144 __do_page_fault+0x67d/0xed0 arch/x86/mm/fault.c:1395 do_page_fault+0xf2/0x7e0 arch/x86/mm/fault.c:1470 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1161 other info that might help us debug this: Chain exists of: (console_sem).lock --> &p->pi_lock --> &rq->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&rq->lock); lock(&p->pi_lock); lock(&rq->lock); lock((console_sem).lock); *** DEADLOCK *** 3 locks held by syz-executor0/13873: #0: 000000004ba1e53c (&mm->mmap_sem){++++}, at: __do_page_fault+0x3e3/0xed0 arch/x86/mm/fault.c:1324 #1: 000000008797e1aa (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1821 [inline] #1: 000000008797e1aa (&rq->lock){-.-.}, at: __schedule+0x236/0x1ed0 kernel/sched/core.c:3411 #2: 00000000b59e3987 (rcu_read_lock){....}, at: atomic_notifier_call_chain+0x0/0x190 kernel/notifier.c:329 stack backtrace: CPU: 1 PID: 13873 Comm: syz-executor0 Not tainted 4.19.0-rc4+ #26 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c4/0x2b4 lib/dump_stack.c:113 print_circular_bug.isra.33.cold.54+0x1bd/0x27d kernel/locking/lockdep.c:1221 check_prev_add kernel/locking/lockdep.c:1861 [inline] check_prevs_add kernel/locking/lockdep.c:1974 [inline] validate_chain kernel/locking/lockdep.c:2415 [inline] __lock_acquire+0x33e4/0x4ec0 kernel/locking/lockdep.c:3411 lock_acquire+0x1ed/0x520 kernel/locking/lockdep.c:3900 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x99/0xd0 kernel/locking/spinlock.c:152 down_trylock+0x13/0x70 kernel/locking/semaphore.c:136 __down_trylock_console_sem+0xae/0x200 kernel/printk/printk.c:227 console_trylock+0x15/0xa0 kernel/printk/printk.c:2245 console_trylock_spinning kernel/printk/printk.c:1649 [inline] vprintk_emit+0x322/0x930 kernel/printk/printk.c:1921 vprintk_default+0x28/0x30 kernel/printk/printk.c:1963 vprintk_func+0x7e/0x181 kernel/printk/printk_safe.c:398 printk+0xa7/0xcf kernel/printk/printk.c:1996 kasan_die_handler.cold.22+0x11/0x30 arch/x86/mm/kasan_init_64.c:251 notifier_call_chain+0x17e/0x380 kernel/notifier.c:93 __atomic_notifier_call_chain kernel/notifier.c:183 [inline] atomic_notifier_call_chain+0x96/0x190 kernel/notifier.c:193 notify_die+0x1bd/0x2d0 kernel/notifier.c:549 do_general_protection+0x248/0x2f0 arch/x86/kernel/traps.c:559 general_protection+0x1e/0x30 arch/x86/entry/entry_64.S:1160 RIP: 0010:__fire_sched_out_preempt_notifiers kernel/sched/core.c:2497 [inline] RIP: 0010:fire_sched_out_preempt_notifiers kernel/sched/core.c:2505 [inline] RIP: 0010:prepare_task_switch kernel/sched/core.c:2611 [inline] RIP: 0010:context_switch kernel/sched/core.c:2790 [inline] RIP: 0010:__schedule+0xfb7/0x1ed0 kernel/sched/core.c:3473 Code: 89 e0 48 c1 e8 03 42 80 3c 28 00 0f 85 b9 09 00 00 4d 8b 24 24 4d 85 e4 0f 84 0b f7 ff ff 49 8d 7c 24 10 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 74 a4 e8 8d ed 03 fa eb 9d 48 89 de 4c 89 ff e8 d0 RSP: 0000:ffff88018ac1f488 EFLAGS: 00010806 RAX: 1bd5a00000000022 RBX: ffff8801976aa600 RCX: 1ffff10031d4ca17 RDX: 0000000040000002 RSI: 0000000000000000 RDI: dead000000000110 RBP: ffff88018ac1f660 R08: ffff880190a4c200 R09: fffff52001e39e47 R10: fffff52001e39e47 R11: ffffc9000f1cf23b R12: dead000000000100 R13: dffffc0000000000 R14: ffff8801daf2cb40 R15: ffff880190a4c200 preempt_schedule_irq+0x87/0x110 kernel/sched/core.c:3700 retint_kernel+0x1b/0x2d RIP: 0010:__sanitizer_cov_trace_cmp4+0x11/0x20 kernel/kcov.c:162 Code: bf 02 00 00 00 48 89 e5 48 8b 4d 08 e8 08 ff ff ff 5d c3 66 0f 1f 44 00 00 55 89 f2 89 fe bf 04 00 00 00 48 89 e5 48 8b 4d 08 ea fe ff ff 5d c3 0f 1f 84 00 00 00 00 00 55 48 89 f2 48 89 fe RSP: 0000:ffff88018ac1f758 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff13 RAX: 0000000000040000 RBX: 0000000000000016 RCX: ffffffff81b36263 RDX: 0000000000000016 RSI: 00000000000001d2 RDI: 0000000000000004 RBP: ffff88018ac1f758 R08: ffff880190a4c200 R09: 0000000000000000 R10: ffffed003b5e4732 R11: ffff8801daf23993 R12: 0000000020e00000 R13: ffffea0005f48000 R14: 0000000000000017 R15: 0000000020e16000 process_huge_page mm/memory.c:4616 [inline] clear_huge_page+0x1e3/0x490 mm/memory.c:4669 __do_huge_pmd_anonymous_page mm/huge_memory.c:567 [inline] do_huge_pmd_anonymous_page+0x854/0x17e0 mm/huge_memory.c:725 create_huge_pmd mm/memory.c:3874 [inline] __handle_mm_fault+0x3880/0x53e0 mm/memory.c:4078 ? lock_downgrade+0x9 Lost 38 message(s)! ---[ end trace 00837951e485eb10 ]--- RIP: 0010:__fire_sched_out_preempt_notifiers kernel/sched/core.c:2497 [inline] RIP: 0010:fire_sched_out_preempt_notifiers kernel/sched/core.c:2505 [inline] RIP: 0010:prepare_task_switch kernel/sched/core.c:2611 [inline] RIP: 0010:context_switch kernel/sched/core.c:2790 [inline] RIP: 0010:__schedule+0xfb7/0x1ed0 kernel/sched/core.c:3473 Code: 89 e0 48 c1 e8 03 42 80 3c 28 00 0f 85 b9 09 00 00 4d 8b 24 24 4d 85 e4 0f 84 0b f7 ff ff 49 8d 7c 24 10 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 74 a4 e8 8d ed 03 fa eb 9d 48 89 de 4c 89 ff e8 d0 RSP: 0000:ffff88018ac1f488 EFLAGS: 00010806 RAX: 1bd5a00000000022 RBX: ffff8801976aa600 RCX: 1ffff10031d4ca17 RDX: 0000000040000002 RSI: 0000000000000000 RDI: dead000000000110 RBP: ffff88018ac1f660 R08: ffff880190a4c200 R09: fffff52001e39e47 R10: fffff52001e39e47 R11: ffffc9000f1cf23b R12: dead000000000100 R13: dffffc0000000000 R14: ffff8801daf2cb40 R15: ffff880190a4c200 FS: 00007fcdf7650700(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020fe9e00 CR3: 00000001d89e2000 CR4: 00000000001426e0