capability: warning: `syz-executor1' uses 32-bit capabilities (legacy support in use) 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: 7310 Comm: syz-executor2 Not tainted 4.19.0-rc4-next-20180921+ #77 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:2502 [inline] RIP: 0010:fire_sched_out_preempt_notifiers kernel/sched/core.c:2510 [inline] RIP: 0010:prepare_task_switch kernel/sched/core.c:2616 [inline] RIP: 0010:context_switch kernel/sched/core.c:2795 [inline] RIP: 0010:__schedule+0x1144/0x1ed0 kernel/sched/core.c:3479 Code: 89 e0 48 c1 e8 03 42 80 3c 28 00 0f 85 7e 08 00 00 4d 8b 24 24 4d 85 e4 0f 84 7e f5 ff ff 49 8d 7c 24 10 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 74 a4 e8 e0 bb 00 fa eb 9d 48 8d bb 28 04 00 00 48 RSP: 0018:ffff88018ea37048 EFLAGS: 00010806 RAX: 1bd5a00000000022 RBX: ffff880197056400 RCX: 1ffff10031d4b89f RDX: 0000000040000002 RSI: 0000000000000000 RDI: dead000000000110 RBP: ffff88018ea37220 R08: ffff8801c7db6440 R09: fffff52000330a47 R10: fffff52000330a47 R11: ffffc9000198523b R12: dead000000000100 R13: dffffc0000000000 R14: ffff8801dad2cc40 R15: ffff8801c7db6440 FS: 00007f3c9455f700(0000) GS:ffff8801dad00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f9429088848 CR3: 00000001baa4e000 CR4: 00000000001426e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: preempt_schedule_irq+0x87/0x110 kernel/sched/core.c:3706 retint_kernel+0x1b/0x2d RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:761 [inline] RIP: 0010:lock_acquire+0x268/0x520 kernel/locking/lockdep.c:3903 Code: 00 00 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 58 02 00 00 48 83 3d d7 5d 12 08 00 0f 84 c3 01 00 00 48 8b bd 20 ff ff ff 57 9d <0f> 1f 44 00 00 48 b8 00 00 00 00 00 fc ff df 48 01 c3 48 c7 03 00 RSP: 0018:ffff88018ea37318 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: dffffc0000000000 RBX: 1ffff10031d46e68 RCX: 0000000000000000 RDX: 1ffffffff12e44be RSI: 0000000000000000 RDI: 0000000000000282 RBP: ffff88018ea37408 R08: ffff8801c7db6ce0 R09: 0000000000000000 R10: ffff8801c7db6cc0 R11: 97110f47370461e4 R12: ffff8801c7db6440 R13: 0000000000000002 R14: 0000000000000000 R15: 0000000000000000 rcu_lock_acquire include/linux/rcupdate.h:223 [inline] rcu_read_lock include/linux/rcupdate.h:607 [inline] is_bpf_text_address+0x39/0x170 kernel/bpf/core.c:543 kernel_text_address+0x79/0xf0 kernel/extable.c:152 __kernel_text_address+0xd/0x40 kernel/extable.c:107 unwind_get_return_address+0x61/0xa0 arch/x86/kernel/unwind_frame.c:18 __save_stack_trace+0x8d/0xf0 arch/x86/kernel/stacktrace.c:45 save_stack_trace+0x1a/0x20 arch/x86/kernel/stacktrace.c:60 save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 kmem_cache_alloc_trace+0x152/0x750 mm/slab.c:3620 kmalloc include/linux/slab.h:546 [inline] kzalloc include/linux/slab.h:741 [inline] kvm_create_vm_debugfs arch/x86/kvm/../../../virt/kvm/kvm_main.c:612 [inline] kvm_dev_ioctl_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:3213 [inline] kvm_dev_ioctl+0xad2/0x1ae0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3240 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0x1de/0x1720 fs/ioctl.c:685 ksys_ioctl+0xa9/0xd0 fs/ioctl.c:702 __do_sys_ioctl fs/ioctl.c:709 [inline] __se_sys_ioctl fs/ioctl.c:707 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:707 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457679 Code: 1d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 eb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f3c9455ec78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f3c9455f6d4 RCX: 0000000000457679 RDX: 0000000000000000 RSI: 000000000000ae01 RDI: 0000000000000006 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000004cfc28 R14: 00000000004bfd60 R15: 0000000000000000 Modules linked in: ====================================================== WARNING: possible circular locking dependency detected 4.19.0-rc4-next-20180921+ #77 Not tainted ------------------------------------------------------ syz-executor2/7310 is trying to acquire lock: 000000004f3a14f6 ((console_sem).lock){-.-.}, at: down_trylock+0x13/0x70 kernel/locking/semaphore.c:136 but task is already holding lock: 00000000e66e1dff (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1125 [inline] 00000000e66e1dff (&rq->lock){-.-.}, at: __schedule+0x236/0x1ed0 kernel/sched/core.c:3417 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:1125 [inline] task_fork_fair+0xb0/0x6d0 kernel/sched/fair.c:9674 sched_fork+0x443/0xba0 kernel/sched/core.c:2358 copy_process+0x2585/0x8780 kernel/fork.c:1887 _do_fork+0x1cb/0x11c0 kernel/fork.c:2216 kernel_thread+0x34/0x40 kernel/fork.c:2275 rest_init+0x22/0xe5 init/main.c:408 start_kernel+0x8bc/0x8f7 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:1964 wake_up_process+0x10/0x20 kernel/sched/core.c:2128 __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:243 console_unlock+0x80c/0x1150 kernel/printk/printk.c:2426 vprintk_emit+0x33d/0x930 kernel/printk/printk.c:1921 vprintk_default+0x28/0x30 kernel/printk/printk.c:1962 vprintk_func+0x7e/0x181 kernel/printk/printk_safe.c:398 printk+0xa7/0xcf kernel/printk/printk.c:1995 load_umh+0x51/0xbd net/bpfilter/bpfilter_kern.c:98 do_one_initcall+0x140/0x956 init/main.c:885 do_initcall_level init/main.c:953 [inline] do_initcalls init/main.c:961 [inline] do_basic_setup init/main.c:979 [inline] kernel_init_freeable+0x4bb/0x5ae init/main.c:1144 kernel_init+0x11/0x1b2 init/main.c:1063 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 -> #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:226 console_trylock+0x15/0xa0 kernel/printk/printk.c:2244 console_trylock_spinning kernel/printk/printk.c:1648 [inline] vprintk_emit+0x322/0x930 kernel/printk/printk.c:1920 vprintk_default+0x28/0x30 kernel/printk/printk.c:1962 vprintk_func+0x7e/0x181 kernel/printk/printk_safe.c:398 printk+0xa7/0xcf kernel/printk/printk.c:1995 kasan_die_handler.cold.22+0x11/0x30 arch/x86/mm/kasan_init_64.c:250 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+0x25b/0x340 arch/x86/kernel/traps.c:573 general_protection+0x1e/0x30 arch/x86/entry/entry_64.S:1138 __fire_sched_out_preempt_notifiers kernel/sched/core.c:2502 [inline] fire_sched_out_preempt_notifiers kernel/sched/core.c:2510 [inline] prepare_task_switch kernel/sched/core.c:2616 [inline] context_switch kernel/sched/core.c:2795 [inline] __schedule+0x1144/0x1ed0 kernel/sched/core.c:3479 preempt_schedule_irq+0x87/0x110 kernel/sched/core.c:3706 retint_kernel+0x1b/0x2d arch_local_irq_restore arch/x86/include/asm/paravirt.h:761 [inline] lock_acquire+0x268/0x520 kernel/locking/lockdep.c:3903 rcu_lock_acquire include/linux/rcupdate.h:223 [inline] rcu_read_lock include/linux/rcupdate.h:607 [inline] is_bpf_text_address+0x39/0x170 kernel/bpf/core.c:543 kernel_text_address+0x79/0xf0 kernel/extable.c:152 __kernel_text_address+0xd/0x40 kernel/extable.c:107 unwind_get_return_address+0x61/0xa0 arch/x86/kernel/unwind_frame.c:18 __save_stack_trace+0x8d/0xf0 arch/x86/kernel/stacktrace.c:45 save_stack_trace+0x1a/0x20 arch/x86/kernel/stacktrace.c:60 save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 kmem_cache_alloc_trace+0x152/0x750 mm/slab.c:3620 kmalloc include/linux/slab.h:546 [inline] kzalloc include/linux/slab.h:741 [inline] kvm_create_vm_debugfs arch/x86/kvm/../../../virt/kvm/kvm_main.c:612 [inline] kvm_dev_ioctl_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:3213 [inline] kvm_dev_ioctl+0xad2/0x1ae0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3240 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0x1de/0x1720 fs/ioctl.c:685 ksys_ioctl+0xa9/0xd0 fs/ioctl.c:702 __do_sys_ioctl fs/ioctl.c:709 [inline] __se_sys_ioctl fs/ioctl.c:707 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:707 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe 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-executor2/7310: #0: 00000000fc195335 (rcu_read_lock){....}, at: is_bpf_text_address+0x0/0x170 kernel/bpf/core.c:530 #1: 00000000e66e1dff (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1125 [inline] #1: 00000000e66e1dff (&rq->lock){-.-.}, at: __schedule+0x236/0x1ed0 kernel/sched/core.c:3417 #2: 00000000fc195335 (rcu_read_lock){....}, at: atomic_notifier_call_chain+0x0/0x190 kernel/notifier.c:329 stack backtrace: CPU: 1 PID: 7310 Comm: syz-executor2 Not tainted 4.19.0-rc4-next-20180921+ #77 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+0x1d3/0x2c4 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:226 console_trylock+0x15/0xa0 kernel/printk/printk.c:2244 console_trylock_spinning kernel/printk/printk.c:1648 [inline] vprintk_emit+0x322/0x930 kernel/printk/printk.c:1920 vprintk_default+0x28/0x30 kernel/printk/printk.c:1962 vprintk_func+0x7e/0x181 kernel/printk/printk_safe.c:398 printk+0xa7/0xcf kernel/printk/printk.c:1995 kasan_die_handler.cold.22+0x11/0x30 arch/x86/mm/kasan_init_64.c:250 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+0x25b/0x340 arch/x86/kernel/traps.c:573 general_protection+0x1e/0x30 arch/x86/entry/entry_64.S:1138 RIP: 0010:__fire_sched_out_preempt_notifiers kernel/sched/core.c:2502 [inline] RIP: 0010:fire_sched_out_preempt_notifiers kernel/sched/core.c:2510 [inline] RIP: 0010:prepare_task_switch kernel/sched/core.c:2616 [inline] RIP: 0010:context_switch kernel/sched/core.c:2795 [inline] RIP: 0010:__schedule+0x1144/0x1ed0 kernel/sched/core.c:3479 Code: 89 e0 48 c1 e8 03 42 80 3c 28 00 0f 85 7e 08 00 00 4d 8b 24 24 4d 85 e4 0f 84 7e f5 ff ff 49 8d 7c 24 10 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 74 a4 e8 e0 bb 00 fa eb 9d 48 8d bb 28 04 00 00 48 RSP: 0018:ffff88018ea37048 EFLAGS: 00010806 RAX: 1bd5a00000000022 RBX: ffff880197056400 RCX: 1ffff10031d4b89f RDX: 0000000040000002 RSI: 0000000000000000 RDI: dead000000000110 RBP: ffff88018ea37220 R08: ffff8801c7db6440 R09: fffff52000330a47 R10: fffff52000330a47 R11: ffffc9000198523b R12: dead000000000100 R13: dffffc0000000000 R14: ffff8801dad2cc40 R15: ffff8801c7db6440 preempt_schedule_irq+0x87/0x110 kernel/sched/core.c:3706 retint_kernel+0x1b/0x2d RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:761 [inline] RIP: 0010:lock_acquire+0x268/0x520 kernel/locking/lockdep.c:3903 Code: 00 00 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 58 02 00 00 48 83 3d d7 5d 12 08 00 0f 84 c3 01 00 00 48 8b bd 20 ff ff ff 57 9d <0f> 1f 44 00 00 48 b8 00 00 00 00 00 fc ff df 48 01 c3 48 c7 03 00 RSP: 0018:ffff88018ea37318 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: dffffc0000000000 RBX: 1ffff10031d46e68 RCX: 0000000000000000 RDX: 1ffffffff12e44be RSI: 0000000000000000 RDI: 0000000000000282 RBP: ffff88018ea37408 R08: ffff8801c7db6ce0 R09: 0000000000000000 R10: ffff8801c7db6cc0 R11: 97110f47370461e4 R12: ffff8801c7db6440 R13: 0000000000000002 R14: 0000000000000000 R15: 0000000000000000 rcu_lock_acquire include/linux/rcupdate.h:223 [inline] rcu_read_lock include/linux/rcupdate.h:607 [inline] is_bpf_text_address+0x39/0x170 kernel/bpf/core.c:543 kernel_text_address+0x79/0xf0 kernel/extable.c:152 __kernel_text_address+0xd/0x40 kernel/extable.c:107 unwind_get_return_address+0x61/0xa0 arch/x86/kernel/unwind_frame.c:18 __save_stack_trace+0x8d/0xf0 arch/x86/kernel/stacktrace.c:45 save_stack_trace+0x1a/0x20 arch/x86/kernel/stacktrace.c:60 save_stack+0x43/0xd0 mm/kasan/kasan.c:448 ? tra Lost 58 message(s)! ---[ end trace 7a2268e7c4db2e76 ]--- RIP: 0010:__fire_sched_out_preempt_notifiers kernel/sched/core.c:2502 [inline] RIP: 0010:fire_sched_out_preempt_notifiers kernel/sched/core.c:2510 [inline] RIP: 0010:prepare_task_switch kernel/sched/core.c:2616 [inline] RIP: 0010:context_switch kernel/sched/core.c:2795 [inline] RIP: 0010:__schedule+0x1144/0x1ed0 kernel/sched/core.c:3479 Code: 89 e0 48 c1 e8 03 42 80 3c 28 00 0f 85 7e 08 00 00 4d 8b 24 24 4d 85 e4 0f 84 7e f5 ff ff 49 8d 7c 24 10 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 74 a4 e8 e0 bb 00 fa eb 9d 48 8d bb 28 04 00 00 48 RSP: 0018:ffff88018ea37048 EFLAGS: 00010806 RAX: 1bd5a00000000022 RBX: ffff880197056400 RCX: 1ffff10031d4b89f RDX: 0000000040000002 RSI: 0000000000000000 RDI: dead000000000110 RBP: ffff88018ea37220 R08: ffff8801c7db6440 R09: fffff52000330a47 R10: fffff52000330a47 R11: ffffc9000198523b R12: dead000000000100 R13: dffffc0000000000 R14: ffff8801dad2cc40 R15: ffff8801c7db6440 FS: 00007f3c9455f700(0000) GS:ffff8801dad00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f9429088848 CR3: 00000001baa4e000 CR4: 00000000001426e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400