====================================================== [ INFO: possible circular locking dependency detected ] 4.4.155+ #34 Not tainted ------------------------------------------------------- syz-executor4/12445 is trying to acquire lock: (&bdev->bd_mutex){+.+.+.}, at: [ 227.818325] audit_printk_skb: 90 callbacks suppressed audit: type=1400 audit(1536643880.907:418): avc: denied { create } for pid=12452 comm="syz-executor1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1536643880.907:419): avc: denied { write } for pid=12452 comm="syz-executor1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1536643880.917:420): avc: denied { read } for pid=12452 comm="syz-executor1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1536643880.917:421): avc: denied { setattr } for pid=12452 comm="syz-executor1" name="ns" dev="proc" ino=37055 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=dir permissive=1 [] blkdev_reread_part+0x1e/0x40 block/ioctl.c:189 but task is already holding lock: (&lo->lo_ctl_mutex#2){+.+...}, at: [] lo_compat_ioctl+0x110/0x140 drivers/block/loop.c:1542 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xbb/0x840 kernel/locking/mutex.c:621 [] __lo_release drivers/block/loop.c:1595 [inline] [] lo_release+0x85/0x1a0 drivers/block/loop.c:1618 [] __blkdev_put+0x636/0x840 fs/block_dev.c:1535 [] blkdev_put+0x85/0x560 fs/block_dev.c:1600 [] blkdev_close+0x8b/0xb0 fs/block_dev.c:1607 [] __fput+0x235/0x6f0 fs/file_table.c:208 [] ____fput+0x15/0x20 fs/file_table.c:244 [] task_work_run+0x10f/0x190 kernel/task_work.c:115 [] tracehook_notify_resume include/linux/tracehook.h:191 [inline] [] exit_to_usermode_loop+0x13d/0x160 arch/x86/entry/common.c:253 [] prepare_exit_to_usermode arch/x86/entry/common.c:284 [inline] [] syscall_return_slowpath+0x1b5/0x1f0 arch/x86/entry/common.c:349 [] int_ret_from_sys_call+0x25/0xa3 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xbb/0x840 kernel/locking/mutex.c:621 [] lo_open+0x1b/0xa0 drivers/block/loop.c:1575 [] __blkdev_get+0x2ae/0xdf0 fs/block_dev.c:1213 [] blkdev_get+0x2da/0x920 fs/block_dev.c:1353 [] blkdev_open+0x1a5/0x250 fs/block_dev.c:1508 [] do_dentry_open+0x38d/0xbd0 fs/open.c:749 [] vfs_open+0x12a/0x210 fs/open.c:862 [] do_last fs/namei.c:3222 [inline] [] path_openat+0x50c/0x39a0 fs/namei.c:3359 [] do_filp_open+0x197/0x270 fs/namei.c:3393 [] do_sys_open+0x31c/0x610 fs/open.c:1038 [] SYSC_open fs/open.c:1056 [inline] [] SyS_open+0x2d/0x40 fs/open.c:1051 [] entry_SYSCALL_64_fastpath+0x1e/0x9a [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x3b6e/0x5ba0 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xbb/0x840 kernel/locking/mutex.c:621 [] blkdev_reread_part+0x1e/0x40 block/ioctl.c:189 [] loop_reread_partitions+0x7c/0x90 drivers/block/loop.c:648 [] loop_set_status+0xa7e/0xfe0 drivers/block/loop.c:1191 [] loop_set_status_compat+0x9a/0xf0 drivers/block/loop.c:1515 [] lo_compat_ioctl+0x11b/0x140 drivers/block/loop.c:1543 [] compat_blkdev_ioctl+0x3a4/0x37eb block/compat_ioctl.c:751 [] C_SYSC_ioctl fs/compat_ioctl.c:1592 [inline] [] compat_SyS_ioctl+0x62e/0x22a0 fs/compat_ioctl.c:1544 [] do_syscall_32_irqs_on arch/x86/entry/common.c:393 [inline] [] do_fast_syscall_32+0x31e/0x8b0 arch/x86/entry/common.c:460 [] sysenter_flags_fixed+0xd/0x1a other info that might help us debug this: Chain exists of: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&lo->lo_ctl_mutex#2); lock(loop_index_mutex); lock(&lo->lo_ctl_mutex#2); lock(&bdev->bd_mutex); *** DEADLOCK *** 1 lock held by syz-executor4/12445: #0: (&lo->lo_ctl_mutex#2){+.+...}, at: [] lo_compat_ioctl+0x110/0x140 drivers/block/loop.c:1542 stack backtrace: CPU: 1 PID: 12445 Comm: syz-executor4 Not tainted 4.4.155+ #34 0000000000000000 da839d2943cbc276 ffff8801c254f5f8 ffffffff81a556dd ffffffff83a976a0 ffffffff83abc6f0 ffffffff83a96ad0 ffff8801d12ea0a8 ffff8801d12e97c0 ffff8801c254f640 ffffffff8139240f 0000000000000001 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_circular_bug.cold.34+0x2f7/0x432 kernel/locking/lockdep.c:1226 [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x3b6e/0x5ba0 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xbb/0x840 kernel/locking/mutex.c:621 [] blkdev_reread_part+0x1e/0x40 block/ioctl.c:189 [] loop_reread_partitions+0x7c/0x90 drivers/block/loop.c:648 [] loop_set_status+0xa7e/0xfe0 drivers/block/loop.c:1191 [] loop_set_status_compat+0x9a/0xf0 drivers/block/loop.c:1515 [] lo_compat_ioctl+0x11b/0x140 drivers/block/loop.c:1543 [] compat_blkdev_ioctl+0x3a4/0x37eb block/compat_ioctl.c:751 [] C_SYSC_ioctl fs/compat_ioctl.c:1592 [inline] [] compat_SyS_ioctl+0x62e/0x22a0 fs/compat_ioctl.c:1544 [] do_syscall_32_irqs_on arch/x86/entry/common.c:393 [inline] [] do_fast_syscall_32+0x31e/0x8b0 arch/x86/entry/common.c:460 [] sysenter_flags_fixed+0xd/0x1a loop_reread_partitions: partition scan of loop0 (ö8Ý‚p'ÅfÖ{I®7Ñ@óS ¹Ê,bÕ~ÏíXÛøq2/.h/Jýü ¥ÓeÄÙ†N8iÍKþii诛) failed (rc=-13) device lo entered promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo left promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode qtaguid: iface_stat: iface_check_stats_reset_and_adjust(lo): iface reset its stats unexpectedly device lo entered promiscuous mode device lo left promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode