[....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 28.359194] kauditd_printk_skb: 7 callbacks suppressed [ 28.359216] audit: type=1800 audit(1542499591.861:29): pid=5853 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 28.391233] audit: type=1800 audit(1542499591.861:30): pid=5853 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="rmnologin" dev="sda1" ino=2423 res=0 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.44' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 52.137616] [ 52.139283] ====================================================== [ 52.145577] WARNING: possible circular locking dependency detected [ 52.151874] 4.20.0-rc2+ #338 Not tainted [ 52.155941] ------------------------------------------------------ [ 52.162239] kworker/0:1/12 is trying to acquire lock: [ 52.167641] 00000000568502c5 (&mdev->req_queue_mutex){+.+.}, at: v4l2_release+0x1d7/0x3a0 [ 52.175955] [ 52.175955] but task is already holding lock: [ 52.181904] 000000009d901cd4 ((delayed_fput_work).work){+.+.}, at: process_one_work+0xb9a/0x1c40 [ 52.190817] [ 52.190817] which lock already depends on the new lock. [ 52.190817] [ 52.199126] [ 52.199126] the existing dependency chain (in reverse order) is: [ 52.206738] [ 52.206738] -> #3 ((delayed_fput_work).work){+.+.}: [ 52.213238] process_one_work+0xc0a/0x1c40 [ 52.217970] worker_thread+0x17f/0x1390 [ 52.222445] kthread+0x35a/0x440 [ 52.226309] ret_from_fork+0x3a/0x50 [ 52.230514] [ 52.230514] -> #2 ((wq_completion)"events"){+.+.}: [ 52.236909] flush_workqueue+0x30a/0x1e10 [ 52.241558] vim2m_stop_streaming+0x7c/0x2c0 [ 52.246469] __vb2_queue_cancel+0x171/0xd20 [ 52.251292] vb2_core_queue_release+0x26/0x80 [ 52.256292] vb2_queue_release+0x15/0x20 [ 52.260857] v4l2_m2m_ctx_release+0x1e/0x35 [ 52.265679] vim2m_release+0xe6/0x150 [ 52.269980] v4l2_release+0x224/0x3a0 [ 52.274286] __fput+0x385/0xa30 [ 52.278139] ____fput+0x15/0x20 [ 52.281931] task_work_run+0x1e8/0x2a0 [ 52.286320] exit_to_usermode_loop+0x318/0x380 [ 52.291400] do_syscall_64+0x6be/0x820 [ 52.295789] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 52.301473] [ 52.301473] -> #1 (&dev->dev_mutex){+.+.}: [ 52.307171] __mutex_lock+0x166/0x16f0 [ 52.311555] mutex_lock_nested+0x16/0x20 [ 52.316114] vim2m_release+0xbc/0x150 [ 52.320409] v4l2_release+0x224/0x3a0 [ 52.324716] __fput+0x385/0xa30 [ 52.328506] ____fput+0x15/0x20 [ 52.332284] task_work_run+0x1e8/0x2a0 [ 52.336671] exit_to_usermode_loop+0x318/0x380 [ 52.341751] do_syscall_64+0x6be/0x820 [ 52.346153] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 52.351835] [ 52.351835] -> #0 (&mdev->req_queue_mutex){+.+.}: [ 52.358140] lock_acquire+0x1ed/0x520 [ 52.362437] __mutex_lock+0x166/0x16f0 [ 52.366822] mutex_lock_nested+0x16/0x20 [ 52.371385] v4l2_release+0x1d7/0x3a0 [ 52.375689] __fput+0x385/0xa30 [ 52.379470] delayed_fput+0x55/0x80 [ 52.383598] process_one_work+0xc90/0x1c40 [ 52.388330] worker_thread+0x17f/0x1390 [ 52.392802] kthread+0x35a/0x440 [ 52.396668] ret_from_fork+0x3a/0x50 [ 52.400873] [ 52.400873] other info that might help us debug this: [ 52.400873] [ 52.408988] Chain exists of: [ 52.408988] &mdev->req_queue_mutex --> (wq_completion)"events" --> (delayed_fput_work).work [ 52.408988] [ 52.421976] Possible unsafe locking scenario: [ 52.421976] [ 52.428008] CPU0 CPU1 [ 52.432645] ---- ---- [ 52.437300] lock((delayed_fput_work).work); [ 52.441784] lock((wq_completion)"events"); [ 52.448686] lock((delayed_fput_work).work); [ 52.455681] lock(&mdev->req_queue_mutex); [ 52.459975] [ 52.459975] *** DEADLOCK *** [ 52.459975] [ 52.466013] 2 locks held by kworker/0:1/12: [ 52.470326] #0: 00000000809bd6ac ((wq_completion)"events"){+.+.}, at: process_one_work+0xb43/0x1c40 [ 52.479598] #1: 000000009d901cd4 ((delayed_fput_work).work){+.+.}, at: process_one_work+0xb9a/0x1c40 [ 52.488939] [ 52.488939] stack backtrace: [ 52.493417] CPU: 0 PID: 12 Comm: kworker/0:1 Not tainted 4.20.0-rc2+ #338 [ 52.500319] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 52.509659] Workqueue: events delayed_fput [ 52.513871] Call Trace: [ 52.516440] dump_stack+0x244/0x39d [ 52.520044] ? dump_stack_print_info.cold.1+0x20/0x20 [ 52.525213] ? vprintk_func+0x85/0x181 [ 52.529092] print_circular_bug.isra.35.cold.54+0x1bd/0x27d [ 52.534784] ? save_trace+0xe0/0x290 [ 52.538477] __lock_acquire+0x3399/0x4c20 [ 52.542610] ? mark_held_locks+0x130/0x130 [ 52.546827] ? __update_load_avg_blocked_se+0x690/0x690 [ 52.552170] ? __update_load_avg_se+0xae0/0xae0 [ 52.556820] ? print_usage_bug+0xc0/0xc0 [ 52.560861] ? lock_unpin_lock+0x4a0/0x4a0 [ 52.565073] ? update_load_avg+0x387/0x2470 [ 52.569390] ? find_held_lock+0x36/0x1c0 [ 52.573432] ? zap_class+0x640/0x640 [ 52.577125] ? __lock_acquire+0x62f/0x4c20 [ 52.581359] ? zap_class+0x640/0x640 [ 52.585052] ? mark_held_locks+0x130/0x130 [ 52.589265] ? add_timer+0x629/0x15a0 [ 52.593047] lock_acquire+0x1ed/0x520 [ 52.596828] ? v4l2_release+0x1d7/0x3a0 [ 52.600797] ? lock_release+0xa00/0xa00 [ 52.604751] ? perf_trace_sched_process_exec+0x860/0x860 [ 52.610194] ? print_usage_bug+0xc0/0xc0 [ 52.614243] ? v4l2_release+0x1d7/0x3a0 [ 52.618197] __mutex_lock+0x166/0x16f0 [ 52.622069] ? v4l2_release+0x1d7/0x3a0 [ 52.626020] ? v4l2_release+0x1d7/0x3a0 [ 52.629976] ? mutex_trylock+0x2b0/0x2b0 [ 52.634015] ? __lock_acquire+0x62f/0x4c20 [ 52.638304] ? mark_held_locks+0x130/0x130 [ 52.642531] ? mark_held_locks+0x130/0x130 [ 52.646747] ? mark_held_locks+0x130/0x130 [ 52.650961] ? lock_downgrade+0x900/0x900 [ 52.655090] ? check_preemption_disabled+0x48/0x280 [ 52.660099] ? zap_class+0x640/0x640 [ 52.663790] ? trace_event_raw_event_lock+0x340/0x340 [ 52.668957] ? zap_class+0x640/0x640 [ 52.672651] ? zap_class+0x640/0x640 [ 52.676363] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 52.681876] ? fsnotify+0x50e/0xef0 [ 52.685483] ? __lock_is_held+0xb5/0x140 [ 52.689522] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 52.695038] ? locks_remove_file+0x3c6/0x5c0 [ 52.699425] ? __sanitizer_cov_trace_const_cmp2+0x18/0x20 [ 52.704938] ? ima_file_free+0x132/0x650 [ 52.708976] ? fsnotify_first_mark+0x350/0x350 [ 52.713537] ? ima_file_check+0x130/0x130 [ 52.717683] ? vivid_remove+0x460/0x460 [ 52.721640] mutex_lock_nested+0x16/0x20 [ 52.725684] ? mutex_lock_nested+0x16/0x20 [ 52.729904] v4l2_release+0x1d7/0x3a0 [ 52.733684] ? dev_debug_store+0x140/0x140 [ 52.737996] __fput+0x385/0xa30 [ 52.741269] ? get_max_files+0x20/0x20 [ 52.745141] delayed_fput+0x55/0x80 [ 52.748749] process_one_work+0xc90/0x1c40 [ 52.752965] ? mark_held_locks+0x130/0x130 [ 52.757182] ? pwq_dec_nr_in_flight+0x4a0/0x4a0 [ 52.761844] ? __switch_to_asm+0x40/0x70 [ 52.765882] ? __switch_to_asm+0x34/0x70 [ 52.769936] ? __switch_to_asm+0x34/0x70 [ 52.773972] ? __switch_to_asm+0x40/0x70 [ 52.778010] ? __switch_to_asm+0x34/0x70 [ 52.782047] ? __switch_to_asm+0x40/0x70 [ 52.786085] ? __switch_to_asm+0x34/0x70 [ 52.790137] ? __switch_to_asm+0x40/0x70 [ 52.794179] ? __schedule+0x8d7/0x21d0 [ 52.798047] ? lock_downgrade+0x900/0x900 [ 52.802173] ? zap_class+0x640/0x640 [ 52.805869] ? find_held_lock+0x36/0x1c0 [ 52.809912] ? lock_acquire+0x1ed/0x520 [ 52.813867] ? worker_thread+0x3e0/0x1390 [ 52.817998] ? kasan_check_read+0x11/0x20 [ 52.822125] ? do_raw_spin_lock+0x14f/0x350 [ 52.826424] ? kasan_check_read+0x11/0x20 [ 52.830557] ? rwlock_bug.part.2+0x90/0x90 [ 52.834784] ? trace_hardirqs_on+0x310/0x310 [ 52.839172] worker_thread+0x17f/0x1390 [ 52.843139] ? __switch_to_asm+0x34/0x70 [ 52.847177] ? __switch_to_asm+0x40/0x70 [ 52.851231] ? __switch_to_asm+0x34/0x70 [ 52.855275] ? process_one_work+0x1c40/0x1c40 [ 52.859754] ? __sched_text_start+0x8/0x8 [ 52.863885] ? __kthread_parkme+0xce/0x1a0 [ 52.868096] ? _raw_spin_unlock_irqrestore+0x82/0xd0 [ 52.873176] ? _raw_spin_unlock_irqrestore+0x82/0xd0 [ 52.878260] ? lockdep_hardirqs_on+0x3bb/0x5b0 [ 52.882822] ? trace_hardirqs_on+0xbd/0x310 executing program [ 52.887138] ? kasan_check_read+0x11/0x20 [ 52.891267] ? __kthread_parkme+0xce/0x1a0 [ 52.895480] ? trace_hardirqs_off_caller+0x310/0x310 [ 52.900561] ? _raw_spin_unlock_irqrestore+0x6d/0xd0 [ 52.905650] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 52.911184] ? __kthread_parkme+0xfb/0x1a0 [ 52.915399] ? process_one_work+0x1c40/0x1c40 [ 52.919871] kthread+0x35a/0x440 [ 52.923234] ? kthread_stop+0x900/0x900 [ 52.927190] ret_from_fork+0x3a/0x50 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program