[....] Starting enhanced syslogd: rsyslogd[ 13.699375] audit: type=1400 audit(1515274459.533:4): avc: denied { syslog } for pid=3177 comm="rsyslogd" capability=34 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1 [?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] 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 Warning: Permanently added '10.128.15.210' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 24.554881] [ 24.556533] ====================================================== [ 24.562818] [ INFO: possible circular locking dependency detected ] [ 24.569454] 4.9.75-g06fe41f #16 Not tainted [ 24.573737] ------------------------------------------------------- [ 24.580107] syzkaller027926/3332 is trying to acquire lock: [ 24.585782] (&bdev->bd_mutex){+.+.+.}, at: [] blkdev_reread_part+0x1e/0x40 [ 24.594764] but task is already holding lock: [ 24.599407] (&lo->lo_ctl_mutex#2){+.+...}, at: [] lo_compat_ioctl+0x109/0x140 [ 24.609748] which lock already depends on the new lock. [ 24.609748] [ 24.618638] [ 24.618638] the existing dependency chain (in reverse order) is: [ 24.626221] -> #1 (&lo->lo_ctl_mutex#2){+.+...}: [ 24.631698] lock_acquire+0x12e/0x410 [ 24.635995] mutex_lock_nested+0xbb/0x870 [ 24.640635] lo_release+0x6b/0x140 [ 24.644665] __blkdev_put+0x5f7/0x7e0 [ 24.648951] blkdev_put+0x85/0x550 [ 24.652987] blkdev_close+0x8b/0xb0 [ 24.657103] __fput+0x28c/0x6e0 [ 24.660877] ____fput+0x15/0x20 [ 24.664643] task_work_run+0x115/0x190 [ 24.669017] exit_to_usermode_loop+0xfc/0x120 [ 24.674001] syscall_return_slowpath+0x1a0/0x1e0 [ 24.679244] entry_SYSCALL_64_fastpath+0xe0/0xe2 [ 24.684486] -> #0 (&bdev->bd_mutex){+.+.+.}: [ 24.689491] __lock_acquire+0x2bf9/0x3640 [ 24.694126] lock_acquire+0x12e/0x410 [ 24.698416] mutex_lock_nested+0xbb/0x870 [ 24.703051] blkdev_reread_part+0x1e/0x40 [ 24.707691] loop_reread_partitions+0x78/0xe0 [ 24.712674] loop_set_status+0x995/0xfc0 [ 24.717221] loop_set_status_compat+0x9a/0x100 [ 24.722287] lo_compat_ioctl+0x114/0x140 [ 24.726838] compat_blkdev_ioctl+0x3e3/0x3bc0 [ 24.731823] compat_SyS_ioctl+0x15f/0x2050 [ 24.736545] do_fast_syscall_32+0x2f7/0x890 [ 24.741354] entry_SYSENTER_compat+0x74/0x83 [ 24.746245] [ 24.746245] other info that might help us debug this: [ 24.746245] [ 24.754352] Possible unsafe locking scenario: [ 24.754352] [ 24.760374] CPU0 CPU1 [ 24.765005] ---- ---- [ 24.771285] lock(&lo->lo_ctl_mutex#2); [ 24.775652] lock(&bdev->bd_mutex); [ 24.782075] lock(&lo->lo_ctl_mutex#2); [ 24.788953] lock(&bdev->bd_mutex); [ 24.792866] [ 24.792866] *** DEADLOCK *** [ 24.792866] [ 24.798892] 1 lock held by syzkaller027926/3332: [ 24.803626] #0: (&lo->lo_ctl_mutex#2){+.+...}, at: [] lo_compat_ioctl+0x109/0x140 [ 24.813523] [ 24.813523] stack backtrace: [ 24.817986] CPU: 1 PID: 3332 Comm: syzkaller027926 Not tainted 4.9.75-g06fe41f #16 [ 24.825658] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.834981] ffff8801caa97768 ffffffff81d93049 ffffffff85385970 ffffffff85385970 [ 24.842937] ffffffff853b2850 ffff8801c980b8d8 ffff8801c980b000 ffff8801caa977b0 [ 24.850892] ffffffff81237431 ffff8801c980b8d8 00000000c980b8b0 ffff8801c980b8d8 [ 24.858858] Call Trace: [ 24.861416] [] dump_stack+0xc1/0x128 [ 24.866750] [] print_circular_bug+0x271/0x310 [ 24.873552] [] __lock_acquire+0x2bf9/0x3640 [ 24.879496] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.886486] [] ? __lock_acquire+0x629/0x3640 [ 24.892512] [] ? __lock_is_held+0xa1/0xf0 [ 24.898276] [] lock_acquire+0x12e/0x410 [ 24.903869] [] ? blkdev_reread_part+0x1e/0x40 [ 24.909980] [] ? blkdev_reread_part+0x1e/0x40 [ 24.916099] [] mutex_lock_nested+0xbb/0x870 [ 24.922038] [] ? blkdev_reread_part+0x1e/0x40 [ 24.928151] [] ? mutex_lock_killable_nested+0x960/0x960 [ 24.935139] [] ? __wake_up+0x1e/0x50 [ 24.940468] [] ? _raw_spin_unlock_irqrestore+0x5a/0x70 [ 24.947365] [] ? trace_hardirqs_on_caller+0x38b/0x590 [ 24.954174] [] blkdev_reread_part+0x1e/0x40 [ 24.960113] [] loop_reread_partitions+0x78/0xe0 [ 24.966398] [] loop_set_status+0x995/0xfc0 [ 24.972249] [] loop_set_status_compat+0x9a/0x100 [ 24.978625] [] ? loop_set_status+0xfc0/0xfc0 [ 24.984650] [] lo_compat_ioctl+0x114/0x140 [ 24.990503] [] ? lo_ioctl+0x1990/0x1990 [ 24.996357] [] compat_blkdev_ioctl+0x3e3/0x3bc0 [ 25.002645] [] ? cfq_dispatch_requests+0x2f40/0x2f40 [ 25.009364] [] ? __do_page_fault+0x5ec/0xd40 [ 25.015389] [] ? security_file_ioctl+0x89/0xb0 [ 25.021589] [] compat_SyS_ioctl+0x15f/0x2050 [ 25.027617] [] ? cfq_dispatch_requests+0x2f40/0x2f40 [ 25.034336] [] ? do_ioctl+0x60/0x60 [ 25.039580] [] do_fast_syscall_32+0x2f7/0x890 [ 25.045691] [] ? trace_hardirqs_off_thunk+0x1a/0x1c executing program executing program [ 25.052327] [] entry_SYSENTER_compat+0x74/0x83 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 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 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