[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [ 12.003582] sshd (3072) used greatest stack depth: 15488 bytes left [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 17.128147] audit: type=1400 audit(1513783405.168:6): avc: denied { map } for pid=3140 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 Warning: Permanently added 'ci-upstream-next-kasan-gce-3,10.128.0.56' (ECDSA) to the list of known hosts. executing program [ 23.311672] audit: type=1400 audit(1513783411.352:7): avc: denied { map } for pid=3154 comm="syzkaller716376" path="/root/syzkaller716376946" dev="sda1" ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 23.344906] kvm: KVM_SET_TSS_ADDR need to be called before entering vcpu [ 23.362986] ================================================================== [ 23.371594] BUG: KASAN: use-after-free in __schedule+0xda3/0x2060 [ 23.377794] Read of size 8 at addr ffff8801c8fd8058 by task syzkaller716376/3154 [ 23.385290] [ 23.386887] CPU: 0 PID: 3154 Comm: syzkaller716376 Not tainted 4.15.0-rc4-next-20171220+ #77 [ 23.395425] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 23.404754] Call Trace: [ 23.407308] dump_stack+0x194/0x257 [ 23.410912] ? arch_local_irq_restore+0x53/0x53 [ 23.415549] ? show_regs_print_info+0x18/0x18 [ 23.420016] ? __schedule+0xda3/0x2060 [ 23.423875] print_address_description+0x73/0x250 [ 23.428687] ? __schedule+0xda3/0x2060 [ 23.432544] kasan_report+0x25b/0x340 [ 23.436315] __asan_report_load8_noabort+0x14/0x20 [ 23.441210] __schedule+0xda3/0x2060 [ 23.444898] ? __sched_text_start+0x8/0x8 [ 23.449017] ? trace_hardirqs_on+0xd/0x10 [ 23.453135] ? __call_srcu+0x7ee/0x1020 [ 23.457077] ? do_raw_spin_trylock+0x190/0x190 [ 23.461634] ? do_raw_spin_trylock+0x190/0x190 [ 23.466195] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 23.472049] ? __debug_object_init+0x235/0x1040 [ 23.476702] preempt_schedule_common+0x22/0x60 [ 23.481260] _cond_resched+0x1d/0x30 [ 23.484942] wait_for_completion+0xa5/0x770 [ 23.489240] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 23.494236] ? wait_for_completion_interruptible+0x7e0/0x7e0 [ 23.500009] ? __lockdep_init_map+0xe4/0x650 [ 23.504393] ? __init_waitqueue_head+0x97/0x140 [ 23.509032] ? init_wait_entry+0x1b0/0x1b0 [ 23.513240] __synchronize_srcu+0x1ad/0x260 [ 23.517530] ? call_srcu+0x10/0x10 [ 23.521037] ? trace_raw_output_rcu_utilization+0xb0/0xb0 [ 23.526557] ? irq_matrix_allocated+0x80/0x80 [ 23.531020] ? synchronize_srcu+0x3c5/0x570 [ 23.535311] synchronize_srcu+0x1a3/0x570 [ 23.539428] ? synchronize_srcu+0x1a3/0x570 [ 23.543716] ? lock_downgrade+0x980/0x980 [ 23.547830] ? synchronize_srcu_expedited+0x20/0x20 [ 23.552814] ? lock_release+0xa40/0xa40 [ 23.556759] ? __mutex_unlock_slowpath+0xe9/0xac0 [ 23.561572] ? do_raw_spin_trylock+0x190/0x190 [ 23.566134] kvm_page_track_unregister_notifier+0x186/0x270 [ 23.571815] ? kvm_slot_page_track_remove_page+0x60/0x60 [ 23.577238] ? kvfree+0x36/0x60 [ 23.580487] ? rcu_read_lock_sched_held+0x108/0x120 [ 23.585480] kvm_mmu_uninit_vm+0x1c/0x20 [ 23.589514] kvm_arch_destroy_vm+0x73b/0x980 [ 23.593893] ? kvm_arch_sync_events+0x30/0x30 [ 23.598356] ? mmdrop+0x18/0x30 [ 23.601604] ? mmu_notifier_unregister+0x437/0x5c0 [ 23.606501] ? kvm_put_kvm+0x47a/0xde0 [ 23.610361] ? mmu_notifier_unregister_no_release+0x3e0/0x3e0 [ 23.616214] ? __free_pages+0x107/0x150 [ 23.620155] ? free_unref_page+0x9e0/0x9e0 [ 23.624359] ? quarantine_put+0xeb/0x190 [ 23.628388] ? kfree+0xf0/0x260 [ 23.631634] ? kvm_put_kvm+0x614/0xde0 [ 23.635493] ? free_pages+0x51/0x90 [ 23.639102] kvm_put_kvm+0x695/0xde0 [ 23.642791] ? kvm_clear_guest+0xb0/0xb0 [ 23.646824] ? kvm_irqfd_release+0xd1/0x120 [ 23.651116] ? lock_downgrade+0x980/0x980 [ 23.655241] ? _raw_spin_unlock_irq+0x27/0x70 [ 23.659711] ? kvm_irqfd_release+0xdd/0x120 [ 23.664000] ? kvm_irqfd_release+0xdd/0x120 [ 23.668292] ? kvm_put_kvm+0xde0/0xde0 [ 23.672149] kvm_vm_release+0x42/0x50 [ 23.675919] __fput+0x327/0x7e0 [ 23.679173] ? fput+0x140/0x140 [ 23.682430] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 23.688280] ? _raw_spin_unlock_irq+0x27/0x70 [ 23.692748] ____fput+0x15/0x20 [ 23.695998] task_work_run+0x199/0x270 [ 23.699856] ? task_work_cancel+0x210/0x210 [ 23.704145] ? _raw_spin_unlock+0x22/0x30 [ 23.708263] ? switch_task_namespaces+0x87/0xc0 [ 23.712902] do_exit+0x9bb/0x1ad0 [ 23.716325] ? kvm_vcpu_fault+0x520/0x520 [ 23.720453] ? mm_update_next_owner+0x930/0x930 [ 23.725096] ? find_held_lock+0x35/0x1d0 [ 23.729132] ? handle_mm_fault+0x2a0/0x930 [ 23.733336] ? find_held_lock+0x35/0x1d0 [ 23.737372] ? __do_page_fault+0x5f7/0xc90 [ 23.741583] ? lock_downgrade+0x980/0x980 [ 23.745704] ? down_read_trylock+0xdb/0x170 [ 23.749994] ? __handle_mm_fault+0x3ce0/0x3ce0 [ 23.754542] ? vmacache_find+0x5f/0x280 [ 23.758483] ? vmacache_update+0xfe/0x130 [ 23.762605] ? up_read+0x1a/0x40 [ 23.765940] ? __do_page_fault+0x3d6/0xc90 [ 23.770150] ? task_work_run+0x1f4/0x270 [ 23.774186] ? kvm_vcpu_fault+0x520/0x520 [ 23.778301] ? do_vfs_ioctl+0x486/0x1520 [ 23.782336] ? ioctl_preallocate+0x2b0/0x2b0 [ 23.786715] ? selinux_capable+0x40/0x40 [ 23.790746] ? __close_fd+0x222/0x360 [ 23.794519] do_group_exit+0x149/0x400 [ 23.798375] ? SyS_exit+0x30/0x30 [ 23.801805] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 23.806792] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 23.811526] SyS_exit_group+0x1d/0x20 [ 23.815295] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 23.820021] RIP: 0033:0x441c58 [ 23.823179] RSP: 002b:00007ffc8a320ab8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 23.830853] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000441c58 [ 23.838089] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 23.845326] RBP: 0000000000000003 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 23.852561] R10: 00008c0000500000 R11: 0000000000000246 R12: 000000000000004a [ 23.859799] R13: 000000002084400c R14: 0000000000000001 R15: 00000000000000ad [ 23.867047] [ 23.868642] Allocated by task 3154: [ 23.872239] save_stack+0x43/0xd0 [ 23.875658] kasan_kmalloc+0xad/0xe0 [ 23.879337] kasan_slab_alloc+0x12/0x20 [ 23.883275] kmem_cache_alloc+0x12e/0x760 [ 23.887391] vmx_create_vcpu+0xc4/0x2f20 [ 23.891420] kvm_arch_vcpu_create+0x12c/0x1a0 [ 23.895881] kvm_vm_ioctl+0x48b/0x1c60 [ 23.899734] do_vfs_ioctl+0x1b1/0x1520 [ 23.903586] SyS_ioctl+0x8f/0xc0 [ 23.906920] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 23.911639] [ 23.913233] Freed by task 3154: [ 23.916481] save_stack+0x43/0xd0 [ 23.919901] kasan_slab_free+0x71/0xc0 [ 23.923763] kmem_cache_free+0x83/0x2a0 [ 23.927705] vmx_free_vcpu+0x1ee/0x260 [ 23.931558] kvm_arch_destroy_vm+0x4a2/0x980 [ 23.935944] kvm_put_kvm+0x695/0xde0 [ 23.939625] kvm_vm_release+0x42/0x50 [ 23.943391] __fput+0x327/0x7e0 [ 23.946635] ____fput+0x15/0x20 [ 23.949881] task_work_run+0x199/0x270 [ 23.953733] do_exit+0x9bb/0x1ad0 [ 23.957159] do_group_exit+0x149/0x400 [ 23.961012] SyS_exit_group+0x1d/0x20 [ 23.964788] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 23.969506] [ 23.971101] The buggy address belongs to the object at ffff8801c8fd8040 [ 23.971101] which belongs to the cache kvm_vcpu of size 23872 [ 23.983637] The buggy address is located 24 bytes inside of [ 23.983637] 23872-byte region [ffff8801c8fd8040, ffff8801c8fddd80) [ 23.995562] The buggy address belongs to the page: [ 24.000456] page:00000000ede17d2d count:1 mapcount:0 mapping:000000007f31cbca index:0x0 compound_mapcount: 0 [ 24.010392] flags: 0x2fffc0000008100(slab|head) [ 24.015030] raw: 02fffc0000008100 ffff8801c8fd8040 0000000000000000 0000000100000001 [ 24.022877] raw: ffff8801d6d65348 ffff8801d6d65348 ffff8801d6d6eb40 0000000000000000 [ 24.030721] page dumped because: kasan: bad access detected [ 24.036402] [ 24.037997] Memory state around the buggy address: [ 24.042892] ffff8801c8fd7f00: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.050217] ffff8801c8fd7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.057543] >ffff8801c8fd8000: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 24.064865] ^ [ 24.071061] ffff8801c8fd8080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.078384] ffff8801c8fd8100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.085707] ================================================================== [ 24.093031] Kernel panic - not syncing: panic_on_warn set ... [ 24.093031] [ 24.100362] CPU: 0 PID: 3154 Comm: syzkaller716376 Tainted: G B 4.15.0-rc4-next-20171220+ #77 [ 24.110210] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.119532] Call Trace: [ 24.122089] dump_stack+0x194/0x257 [ 24.125686] ? arch_local_irq_restore+0x53/0x53 [ 24.130324] ? kasan_end_report+0x32/0x50 [ 24.134448] ? lock_downgrade+0x980/0x980 [ 24.138566] ? vsnprintf+0x1ed/0x1900 [ 24.142336] ? __schedule+0xcf0/0x2060 [ 24.146192] panic+0x1e4/0x41c [ 24.149355] ? refcount_error_report+0x214/0x214 [ 24.154091] ? print_shadow_for_address+0xdc/0x1a0 [ 24.158988] ? add_taint+0x1c/0x50 [ 24.162499] ? __schedule+0xda3/0x2060 [ 24.166467] kasan_end_report+0x50/0x50 [ 24.170421] kasan_report+0x144/0x340 [ 24.174192] __asan_report_load8_noabort+0x14/0x20 [ 24.179089] __schedule+0xda3/0x2060 [ 24.182786] ? __sched_text_start+0x8/0x8 [ 24.186902] ? trace_hardirqs_on+0xd/0x10 [ 24.191020] ? __call_srcu+0x7ee/0x1020 [ 24.194964] ? do_raw_spin_trylock+0x190/0x190 [ 24.199511] ? do_raw_spin_trylock+0x190/0x190 [ 24.204070] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.209921] ? __debug_object_init+0x235/0x1040 [ 24.214563] preempt_schedule_common+0x22/0x60 [ 24.219112] _cond_resched+0x1d/0x30 [ 24.222796] wait_for_completion+0xa5/0x770 [ 24.227086] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.232069] ? wait_for_completion_interruptible+0x7e0/0x7e0 [ 24.237847] ? __lockdep_init_map+0xe4/0x650 [ 24.242229] ? __init_waitqueue_head+0x97/0x140 [ 24.246869] ? init_wait_entry+0x1b0/0x1b0 [ 24.251079] __synchronize_srcu+0x1ad/0x260 [ 24.255368] ? call_srcu+0x10/0x10 [ 24.258876] ? trace_raw_output_rcu_utilization+0xb0/0xb0 [ 24.264387] ? irq_matrix_allocated+0x80/0x80 [ 24.268849] ? synchronize_srcu+0x3c5/0x570 [ 24.273142] synchronize_srcu+0x1a3/0x570 [ 24.277266] ? synchronize_srcu+0x1a3/0x570 [ 24.281557] ? lock_downgrade+0x980/0x980 [ 24.285673] ? synchronize_srcu_expedited+0x20/0x20 [ 24.290658] ? lock_release+0xa40/0xa40 [ 24.294600] ? __mutex_unlock_slowpath+0xe9/0xac0 [ 24.299412] ? do_raw_spin_trylock+0x190/0x190 [ 24.303976] kvm_page_track_unregister_notifier+0x186/0x270 [ 24.309658] ? kvm_slot_page_track_remove_page+0x60/0x60 [ 24.315079] ? kvfree+0x36/0x60 [ 24.318328] ? rcu_read_lock_sched_held+0x108/0x120 [ 24.323316] kvm_mmu_uninit_vm+0x1c/0x20 [ 24.327347] kvm_arch_destroy_vm+0x73b/0x980 [ 24.331724] ? kvm_arch_sync_events+0x30/0x30 [ 24.336186] ? mmdrop+0x18/0x30 [ 24.339435] ? mmu_notifier_unregister+0x437/0x5c0 [ 24.344337] ? kvm_put_kvm+0x47a/0xde0 [ 24.348197] ? mmu_notifier_unregister_no_release+0x3e0/0x3e0 [ 24.354050] ? __free_pages+0x107/0x150 [ 24.357993] ? free_unref_page+0x9e0/0x9e0 [ 24.362197] ? quarantine_put+0xeb/0x190 [ 24.366222] ? kfree+0xf0/0x260 [ 24.369470] ? kvm_put_kvm+0x614/0xde0 [ 24.373329] ? free_pages+0x51/0x90 [ 24.376925] kvm_put_kvm+0x695/0xde0 [ 24.380614] ? kvm_clear_guest+0xb0/0xb0 [ 24.384648] ? kvm_irqfd_release+0xd1/0x120 [ 24.388941] ? lock_downgrade+0x980/0x980 [ 24.393068] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.397539] ? kvm_irqfd_release+0xdd/0x120 [ 24.401838] ? kvm_irqfd_release+0xdd/0x120 [ 24.406128] ? kvm_put_kvm+0xde0/0xde0 [ 24.409982] kvm_vm_release+0x42/0x50 [ 24.413751] __fput+0x327/0x7e0 [ 24.417002] ? fput+0x140/0x140 [ 24.420250] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.426099] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.430566] ____fput+0x15/0x20 [ 24.433813] task_work_run+0x199/0x270 [ 24.437670] ? task_work_cancel+0x210/0x210 [ 24.441958] ? _raw_spin_unlock+0x22/0x30 [ 24.446075] ? switch_task_namespaces+0x87/0xc0 [ 24.450716] do_exit+0x9bb/0x1ad0 [ 24.454136] ? kvm_vcpu_fault+0x520/0x520 [ 24.458254] ? mm_update_next_owner+0x930/0x930 [ 24.462894] ? find_held_lock+0x35/0x1d0 [ 24.466930] ? handle_mm_fault+0x2a0/0x930 [ 24.471132] ? find_held_lock+0x35/0x1d0 [ 24.475169] ? __do_page_fault+0x5f7/0xc90 [ 24.479372] ? lock_downgrade+0x980/0x980 [ 24.483492] ? down_read_trylock+0xdb/0x170 [ 24.487782] ? __handle_mm_fault+0x3ce0/0x3ce0 [ 24.492328] ? vmacache_find+0x5f/0x280 [ 24.496270] ? vmacache_update+0xfe/0x130 [ 24.500389] ? up_read+0x1a/0x40 [ 24.503724] ? __do_page_fault+0x3d6/0xc90 [ 24.507928] ? task_work_run+0x1f4/0x270 [ 24.511963] ? kvm_vcpu_fault+0x520/0x520 [ 24.516185] ? do_vfs_ioctl+0x486/0x1520 [ 24.520219] ? ioctl_preallocate+0x2b0/0x2b0 [ 24.524615] ? selinux_capable+0x40/0x40 [ 24.528645] ? __close_fd+0x222/0x360 [ 24.532417] do_group_exit+0x149/0x400 [ 24.536278] ? SyS_exit+0x30/0x30 [ 24.539700] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.544685] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 24.549412] SyS_exit_group+0x1d/0x20 [ 24.553184] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 24.557905] RIP: 0033:0x441c58 [ 24.561065] RSP: 002b:00007ffc8a320ab8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 24.568751] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000441c58 [ 24.575987] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 24.583224] RBP: 0000000000000003 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 24.590485] R10: 00008c0000500000 R11: 0000000000000246 R12: 000000000000004a [ 24.597720] R13: 000000002084400c R14: 0000000000000001 R15: 00000000000000ad [ 24.604973] [ 24.604975] ====================================================== [ 24.604977] WARNING: possible circular locking dependency detected [ 24.604979] 4.15.0-rc4-next-20171220+ #77 Not tainted [ 24.604982] ------------------------------------------------------ [ 24.604984] syzkaller716376/3154 is trying to acquire lock: [ 24.604985] ((console_sem).lock){..-.}, at: [<000000008b0def5b>] down_trylock+0x13/0x70 [ 24.604990] [ 24.604993] but task is already holding lock: [ 24.604993] (report_lock){....}, at: [<000000003ed05aa3>] kasan_report+0x6b/0x340 [ 24.604999] [ 24.605001] which lock already depends on the new lock. [ 24.605002] [ 24.605003] [ 24.605005] the existing dependency chain (in reverse order) is: [ 24.605006] [ 24.605007] -> #3 (report_lock){....}: [ 24.605013] _raw_spin_lock_irqsave+0x96/0xc0 [ 24.605014] kasan_report+0x6b/0x340 [ 24.605016] __asan_report_load8_noabort+0x14/0x20 [ 24.605018] __schedule+0xda3/0x2060 [ 24.605020] preempt_schedule_common+0x22/0x60 [ 24.605021] _cond_resched+0x1d/0x30 [ 24.605023] wait_for_completion+0xa5/0x770 [ 24.605025] __synchronize_srcu+0x1ad/0x260 [ 24.605026] synchronize_srcu+0x1a3/0x570 [ 24.605029] kvm_page_track_unregister_notifier+0x186/0x270 [ 24.605030] kvm_mmu_uninit_vm+0x1c/0x20 [ 24.605032] kvm_arch_destroy_vm+0x73b/0x980 [ 24.605034] kvm_put_kvm+0x695/0xde0 [ 24.605035] kvm_vm_release+0x42/0x50 [ 24.605037] __fput+0x327/0x7e0 [ 24.605038] ____fput+0x15/0x20 [ 24.605040] task_work_run+0x199/0x270 [ 24.605042] do_exit+0x9bb/0x1ad0 [ 24.605044] do_group_exit+0x149/0x400 [ 24.605045] SyS_exit_group+0x1d/0x20 [ 24.605047] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 24.605048] [ 24.605049] -> #2 (&rq->lock){-.-.}: [ 24.605054] _raw_spin_lock+0x2a/0x40 [ 24.605056] task_fork_fair+0x7a/0x690 [ 24.605057] sched_fork+0x435/0xc00 [ 24.605059] copy_process.part.37+0x1758/0x4b60 [ 24.605061] _do_fork+0x1f7/0xf70 [ 24.605062] kernel_thread+0x34/0x40 [ 24.605064] rest_init+0x22/0xf0 [ 24.605065] start_kernel+0x7f1/0x819 [ 24.605067] x86_64_start_reservations+0x2a/0x2c [ 24.605069] x86_64_start_kernel+0x77/0x7a [ 24.605071] secondary_startup_64+0xa5/0xb0 [ 24.605072] [ 24.605072] -> #1 (&p->pi_lock){-.-.}: [ 24.605078] _raw_spin_lock_irqsave+0x96/0xc0 [ 24.605080] try_to_wake_up+0xbc/0x1600 [ 24.605081] wake_up_process+0x10/0x20 [ 24.605083] __up.isra.0+0x1cc/0x2c0 [ 24.605084] up+0x13b/0x1d0 [ 24.605086] __up_console_sem+0xb2/0x1a0 [ 24.605087] console_unlock+0x538/0xd70 [ 24.605089] do_con_write+0x106e/0x1f70 [ 24.605091] con_write+0x25/0xb0 [ 24.605092] n_tty_write+0x5ef/0xec0 [ 24.605094] tty_write+0x3fa/0x840 [ 24.605095] __vfs_write+0xef/0x970 [ 24.605097] vfs_write+0x189/0x510 [ 24.605098] SyS_write+0xef/0x220 [ 24.605100] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 24.605101] [ 24.605102] -> #0 ((console_sem).lock){..-.}: [ 24.605108] lock_acquire+0x1d5/0x580 [ 24.605110] _raw_spin_lock_irqsave+0x96/0xc0 [ 24.605111] down_trylock+0x13/0x70 [ 24.605113] __down_trylock_console_sem+0xa2/0x1e0 [ 24.605115] console_trylock+0x15/0x100 [ 24.605117] vprintk_emit+0x49b/0x590 [ 24.605118] vprintk_default+0x28/0x30 [ 24.605120] vprintk_func+0x57/0xc0 [ 24.605121] printk+0xaa/0xca [ 24.605123] kasan_report+0x7b/0x340 [ 24.605125] __asan_report_load8_noabort+0x14/0x20 [ 24.605127] __schedule+0xda3/0x2060 [ 24.605128] preempt_schedule_common+0x22/0x60 [ 24.605130] _cond_resched+0x1d/0x30 [ 24.605132] wait_for_completion+0xa5/0x770 [ 24.605134] __synchronize_srcu+0x1ad/0x260 [ 24.605135] synchronize_srcu+0x1a3/0x570 [ 24.605137] kvm_page_track_unregister_notifier+0x186/0x270 [ 24.605139] kvm_mmu_uninit_vm+0x1c/0x20 [ 24.605141] kvm_arch_destroy_vm+0x73b/0x980 [ 24.605142] kvm_put_kvm+0x695/0xde0 [ 24.605144] kvm_vm_release+0x42/0x50 [ 24.605146] __fput+0x327/0x7e0 [ 24.605147] ____fput+0x15/0x20 [ 24.605149] task_work_run+0x199/0x270 [ 24.605150] do_exit+0x9bb/0x1ad0 [ 24.605152] do_group_exit+0x149/0x400 [ 24.605153] SyS_exit_group+0x1d/0x20 [ 24.605155] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 24.605156] [ 24.605158] other info that might help us debug this: [ 24.605159] [ 24.605160] Chain exists of: [ 24.605161] (console_sem).lock --> &rq->lock --> report_lock [ 24.605168] [ 24.605169] Possible unsafe locking scenario: [ 24.605170] [ 24.605172] CPU0 CPU1 [ 24.605174] ---- ---- [ 24.605174] lock(report_lock); [ 24.605178] lock(&rq->lock); [ 24.605182] lock(report_lock); [ 24.605185] lock((console_sem).lock); [ 24.605188] [ 24.605189] *** DEADLOCK *** [ 24.605190] [ 24.605192] 2 locks held by syzkaller716376/3154: [ 24.605193] #0: (&rq->lock){-.-.}, at: [<00000000f1df3817>] __schedule+0x24e/0x2060 [ 24.605198] #1: (report_lock){....}, at: [<000000003ed05aa3>] kasan_report+0x6b/0x340 [ 24.605204] [ 24.605205] stack backtrace: [ 24.605208] CPU: 0 PID: 3154 Comm: syzkaller716376 Not tainted 4.15.0-rc4-next-20171220+ #77 [ 24.605212] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.605213] Call Trace: [ 24.605215] dump_stack+0x194/0x257 [ 24.605216] ? arch_local_irq_restore+0x53/0x53 [ 24.605218] print_circular_bug.isra.37+0x2cd/0x2dc [ 24.605220] ? save_trace+0xe0/0x2b0 [ 24.605222] __lock_acquire+0x30a8/0x3e00 [ 24.605223] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.605225] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.605227] ? print_lockdep_cache.isra.31+0x109/0x109 [ 24.605229] ? save_stack_trace+0x1a/0x20 [ 24.605231] ? save_trace+0xe0/0x2b0 [ 24.605232] ? __lock_acquire+0x36c0/0x3e00 [ 24.605234] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 24.605236] ? __lock_is_held+0xb6/0x140 [ 24.605237] ? __lock_is_held+0xb6/0x140 [ 24.605239] lock_acquire+0x1d5/0x580 [ 24.605240] ? lock_acquire+0x1d5/0x580 [ 24.605242] ? down_trylock+0x13/0x70 [ 24.605244] ? find_held_lock+0x35/0x1d0 [ 24.605245] ? lock_release+0xa40/0xa40 [ 24.605247] ? vprintk_emit+0x379/0x590 [ 24.605249] ? lock_downgrade+0x980/0x980 [ 24.605250] ? kvm_sched_clock_read+0x25/0x40 [ 24.605252] ? sched_clock+0x31/0x40 [ 24.605253] ? sched_clock_cpu+0x1b/0x170 [ 24.605255] ? vprintk_emit+0x49b/0x590 [ 24.605257] _raw_spin_lock_irqsave+0x96/0xc0 [ 24.605258] ? down_trylock+0x13/0x70 [ 24.605260] down_trylock+0x13/0x70 [ 24.605261] ? vprintk_emit+0x49b/0x590 [ 24.605263] __down_trylock_console_sem+0xa2/0x1e0 [ 24.605265] console_trylock+0x15/0x100 [ 24.605266] vprintk_emit+0x49b/0x590 [ 24.605268] vprintk_default+0x28/0x30 [ 24.605269] vprintk_func+0x57/0xc0 [ 24.605271] printk+0xaa/0xca [ 24.605273] ? show_regs_print_info+0x18/0x18 [ 24.605274] ? __schedule+0xda3/0x2060 [ 24.605276] kasan_report+0x7b/0x340 [ 24.605277] __asan_report_load8_noabort+0x14/0x20 [ 24.605279] __schedule+0xda3/0x2060 [ 24.605281] ? __sched_text_start+0x8/0x8 [ 24.605282] ? trace_hardirqs_on+0xd/0x10 [ 24.605284] ? __call_srcu+0x7ee/0x1020 [ 24.605286] ? do_raw_spin_trylock+0x190/0x190 [ 24.605287] ? do_raw_spin_trylock+0x190/0x190 [ 24.605289] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.605291] ? __debug_object_init+0x235/0x1040 [ 24.605293] preempt_schedule_common+0x22/0x60 [ 24.605294] _cond_resched+0x1d/0x30 [ 24.605296] wait_for_completion+0xa5/0x770 [ 24.605298] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.605300] ? wait_for_completion_interruptible+0x7e0/0x7e0 [ 24.605302] ? __lockdep_init_map+0xe4/0x650 [ 24.605304] ? __init_waitqueue_head+0x97/0x140 [ 24.605305] ? init_wait_entry+0x1b0/0x1b0 [ 24.605307] __synchronize_srcu+0x1ad/0x260 [ 24.605308] ? call_srcu+0x10/0x10 [ 24.605310] ? trace_raw_output_rcu_utilization+0xb0/0xb0 [ 24.605312] ? irq_matrix_allocated+0x80/0x80 [ 24.605314] ? synchronize_srcu+0x3c5/0x570 [ 24.605315] synchronize_srcu+0x1a3/0x570 [ 24.605317] ? synchronize_srcu+0x1a3/0x570 [ 24.605319] ? lock_downgrade+0x980/0x980 [ 24.605321] ? synchronize_srcu_expedited+0x20/0x20 [ 24.605322] ? lock_release+0xa40/0xa40 [ 24.605324] ? __mutex_unlock_slowpath+0xe9/0xac0 [ 24.605326] ? do_raw_spin_trylock+0x190/0x190 [ 24.605328] kvm_page_track_unregister_notifier+0x186/0x270 [ 24.605330] ? kvm_slot_page_track_remove_page+0x60/0x60 [ 24.605332] ? kvfree+0x36/0x60 [ 24.605333] ? rcu_read_lock_sched_held+0x108/0x120 [ 24.605335] kvm_mmu_uninit_vm+0x1c/0x20 [ 24.605337] kvm_arch_destroy_vm+0x73b/0x980 [ 24.605339] ? kvm_arch_sync_events+0x30/0x30 [ 24.605340] ? mmdrop+0x18/0x30 [ 24.605342] ? mmu_notifier_unregister+0x437/0x5c0 [ 24.605343] ? kvm_put_kvm+0x47a/0xde0 [ 24.605346] ? mmu_notifier_unregister_no_release+0x3e0/0x3e0 [ 24.605348] ? __free_pages+0x107/0x150 [ 24.605350] ? free_unref_page+0x9e0/0x9e0 [ 24.605351] ? quarantine_put+0xeb/0x190 [ 24.605353] ? kfree+0xf0/0x260 [ 24.605354] ? kvm_put_kvm+0x614/0xde0 [ 24.605356] ? free_pages+0x51/0x90 [ 24.605358] kvm_put_kvm+0x695/0xde0 [ 24.605359] ? kvm_clear_guest+0xb0/0xb0 [ 24.605361] ? kvm_irqfd_release+0xd1/0x120 [ 24.605362] ? lock_downgrade+0x980/0x980 [ 24.605364] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.605366] ? kvm_irqfd_release+0xdd/0x120 [ 24.605367] ? kvm_irqfd_release+0xdd/0x120 [ 24.605369] ? kvm_put_kvm+0xde0/0xde0 [ 24.605371] kvm_vm_release+0x42/0x50 [ 24.605372] __fput+0x327/0x7e0 [ 24.605373] ? fput+0x140/0x140 [ 24.605376] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 24.605377] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.605379] ____fput+0x15/0x20 [ 24.605380] task_work_run+0x199/0x270 [ 24.605382] ? task_work_cancel+0x210/0x210 [ 24.605383] ? _raw_spin_unlock+0x22/0x30 [ 24.605385] ? switch_task_namespaces+0x87/0xc0 [ 24.605387] do_exit+0x9bb/0x1ad0 [ 24.605388] ? kvm_vcpu_fault+0x520/0x520 [ 24.605390] ? mm_update_next_owner+0x930/0x930 [ 24.605392] ? find_held_lock+0x35/0x1d0 [ 24.605393] ? handle_mm_fault+0x2a0/0x930 [ 24.605395] ? find_held_lock+0x35/0x1d0 [ 24.605397] ? __do_page_fault+0x5f7/0xc90 [ 24.605398] ? lock_downgrade+0x980/0x980 [ 24.605400] ? down_read_trylock+0xdb/0x170 [ 24.605402] ? __handle_mm_fault+0x3ce0/0x3ce0 [ 24.605403] ? vmacache_find+0x5f/0x280 [ 24.605405] ? vmacache_update+0xfe/0x130 [ 24.605406] ? up_read+0x1a/0x40 [ 24.605408] ? __do_page_fault+0x3d6/0xc90 [ 24.605410] ? task_work_run+0x1f4/0x270 [ 24.605411] ? kvm_vcpu_fault+0x520/0x520 [ 24.605413] ? do_vfs_ioctl+0x486/0x1520 [ 24.605415] ? ioctl_preallocate+0x2b0/0x2b0 [ 24.605419] ? selinux_capable+0x40/0 [ 24.605422] Lost 15 message(s)! [ 25.683264] Shutting down cpus with NMI [ 26.738360] Dumping ftrace buffer: [ 26.741871] (ftrace buffer empty) [ 26.745549] Kernel Offset: disabled [ 26.749142] Rebooting in 86400 seconds..