====================================================== [ INFO: possible circular locking dependency detected ] 4.4.174+ #4 Not tainted ------------------------------------------------------- syz-executor.1/29055 is trying to acquire lock: (&pipe->mutex/1){+.+.+.}, at: [] pipe_lock_nested fs/pipe.c:65 [inline] (&pipe->mutex/1){+.+.+.}, at: [] pipe_lock+0x63/0x80 fs/pipe.c:73 but task is already holding lock: (sb_writers#4){.+.+.+}, at: [] file_start_write include/linux/fs.h:2543 [inline] (sb_writers#4){.+.+.+}, at: [] do_splice fs/splice.c:1403 [inline] (sb_writers#4){.+.+.+}, at: [] SYSC_splice fs/splice.c:1707 [inline] (sb_writers#4){.+.+.+}, at: [] SyS_splice+0xf2d/0x13a0 fs/splice.c:1690 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 [] percpu_down_read include/linux/percpu-rwsem.h:26 [inline] [] __sb_start_write+0x1af/0x310 fs/super.c:1239 [] sb_start_write include/linux/fs.h:1517 [inline] [] ext4_run_li_request fs/ext4/super.c:2685 [inline] [] ext4_lazyinit_thread fs/ext4/super.c:2784 [inline] [] ext4_lazyinit_thread+0x1e4/0x7b0 fs/ext4/super.c:2760 [] kthread+0x273/0x310 kernel/kthread.c:211 [] ret_from_fork+0x55/0x80 arch/x86/entry/entry_64.S:537 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xc1/0xb80 kernel/locking/mutex.c:621 [] ext4_register_li_request+0x2fd/0x7d0 fs/ext4/super.c:2972 [] ext4_remount+0x1366/0x1b90 fs/ext4/super.c:4922 [] do_remount_sb2+0x41b/0x7a0 fs/super.c:781 [] do_remount fs/namespace.c:2347 [inline] [] do_mount+0xfdb/0x2a40 fs/namespace.c:2860 [] SYSC_mount fs/namespace.c:3063 [inline] [] SyS_mount+0x130/0x1d0 fs/namespace.c:3041 [] entry_SYSCALL_64_fastpath+0x1e/0x9a [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xc1/0xb80 kernel/locking/mutex.c:621 [] ext4_register_li_request+0x89/0x7d0 fs/ext4/super.c:2945 [] ext4_remount+0x1366/0x1b90 fs/ext4/super.c:4922 [] do_remount_sb2+0x41b/0x7a0 fs/super.c:781 [] do_remount fs/namespace.c:2347 [inline] [] do_mount+0xfdb/0x2a40 fs/namespace.c:2860 [] SYSC_mount fs/namespace.c:3063 [inline] [] SyS_mount+0x130/0x1d0 fs/namespace.c:3041 [] entry_SYSCALL_64_fastpath+0x1e/0x9a [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] down_read+0x42/0x60 kernel/locking/rwsem.c:22 [] iterate_supers+0xe1/0x250 fs/super.c:547 [] selinux_complete_init+0x2f/0x31 security/selinux/hooks.c:6154 [] security_load_policy+0x69d/0x9c0 security/selinux/ss/services.c:2060 [] sel_write_load+0x175/0xf90 security/selinux/selinuxfs.c:535 [] __vfs_write+0x116/0x3d0 fs/read_write.c:491 [] vfs_write+0x182/0x4e0 fs/read_write.c:540 [] SYSC_write fs/read_write.c:587 [inline] [] SyS_write+0xdc/0x1c0 fs/read_write.c:579 [] entry_SYSCALL_64_fastpath+0x1e/0x9a [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xc1/0xb80 kernel/locking/mutex.c:621 [] sel_commit_bools_write+0x89/0x260 security/selinux/selinuxfs.c:1142 [] __vfs_write+0x116/0x3d0 fs/read_write.c:491 [] __kernel_write+0x112/0x370 fs/read_write.c:513 [] write_pipe_buf+0x15d/0x1f0 fs/splice.c:1074 [] splice_from_pipe_feed fs/splice.c:776 [inline] [] __splice_from_pipe+0x37e/0x7a0 fs/splice.c:901 [] splice_from_pipe+0x108/0x170 fs/splice.c:936 [] default_file_splice_write+0x3c/0x80 fs/splice.c:1086 [] do_splice_from fs/splice.c:1128 [inline] [] do_splice fs/splice.c:1404 [inline] [] SYSC_splice fs/splice.c:1707 [inline] [] SyS_splice+0xd71/0x13a0 fs/splice.c:1690 [] 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+0x37d6/0x4f50 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+0xc1/0xb80 kernel/locking/mutex.c:621 [] pipe_lock_nested fs/pipe.c:65 [inline] [] pipe_lock+0x63/0x80 fs/pipe.c:73 [] iter_file_splice_write+0x179/0xb30 fs/splice.c:974 [] do_splice_from fs/splice.c:1128 [inline] [] do_splice fs/splice.c:1404 [inline] [] SYSC_splice fs/splice.c:1707 [inline] [] SyS_splice+0xd71/0x13a0 fs/splice.c:1690 [] entry_SYSCALL_64_fastpath+0x1e/0x9a other info that might help us debug this: Chain exists of: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sb_writers#4); lock(&eli->li_list_mtx); lock(sb_writers#4); lock(&pipe->mutex/1); *** DEADLOCK *** 1 lock held by syz-executor.1/29055: #0: (sb_writers#4){.+.+.+}, at: [] file_start_write include/linux/fs.h:2543 [inline] #0: (sb_writers#4){.+.+.+}, at: [] do_splice fs/splice.c:1403 [inline] #0: (sb_writers#4){.+.+.+}, at: [] SYSC_splice fs/splice.c:1707 [inline] #0: (sb_writers#4){.+.+.+}, at: [] SyS_splice+0xf2d/0x13a0 fs/splice.c:1690 stack backtrace: CPU: 0 PID: 29055 Comm: syz-executor.1 Not tainted 4.4.174+ #4 0000000000000000 b9f042692cdb47f5 ffff8800b3da78b0 ffffffff81aad1a1 ffffffff84057a80 ffff8801b9124740 ffffffff83abd2b0 ffffffff83abc380 ffffffff83ac8080 ffff8800b3da7900 ffffffff813abcda ffffffff83e1ed00 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [] print_circular_bug.cold+0x2f7/0x44e 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+0x37d6/0x4f50 kernel/locking/lockdep.c:3213 binder_alloc: 22246: binder_alloc_buf size 96 failed, no address space binder_alloc: allocated: 12280 (num: 120 largest: 1024), free: 8 (num: 1 largest: 8) binder: 29069:29070 transaction failed 29201/-28, size 72-24 line 3137 binder: undelivered TRANSACTION_ERROR: 29201 binder_alloc: 22246: binder_alloc_buf size 96 failed, no address space binder_alloc: allocated: 12280 (num: 120 largest: 1024), free: 8 (num: 1 largest: 8) binder: 29069:29070 transaction failed 29201/-28, size 72-24 line 3137 binder: undelivered TRANSACTION_ERROR: 29201 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xc1/0xb80 kernel/locking/mutex.c:621 [] pipe_lock_nested fs/pipe.c:65 [inline] [] pipe_lock+0x63/0x80 fs/pipe.c:73 [] iter_file_splice_write+0x179/0xb30 fs/splice.c:974 [] do_splice_from fs/splice.c:1128 [inline] [] do_splice fs/splice.c:1404 [inline] [] SYSC_splice fs/splice.c:1707 [inline] [] SyS_splice+0xd71/0x13a0 fs/splice.c:1690 [] entry_SYSCALL_64_fastpath+0x1e/0x9a binder_alloc: 22246: binder_alloc_buf size 96 failed, no address space binder_alloc: allocated: 12280 (num: 120 largest: 1024), free: 8 (num: 1 largest: 8) binder: 29084:29087 transaction failed 29201/-28, size 72-24 line 3137 binder: undelivered TRANSACTION_ERROR: 29201 binder_alloc: 22246: binder_alloc_buf size 96 failed, no address space binder_alloc: allocated: 12280 (num: 120 largest: 1024), free: 8 (num: 1 largest: 8) binder: 29085:29094 transaction failed 29201/-28, size 72-24 line 3137 binder: undelivered TRANSACTION_ERROR: 29201 binder_alloc: 22246: binder_alloc_buf size 96 failed, no address space binder_alloc: allocated: 12280 (num: 120 largest: 1024), free: 8 (num: 1 largest: 8) binder: 29098:29101 transaction failed 29201/-28, size 72-24 line 3137 binder: undelivered TRANSACTION_ERROR: 29201 binder_alloc: 22246: binder_alloc_buf size 96 failed, no address space binder_alloc: allocated: 12280 (num: 120 largest: 1024), free: 8 (num: 1 largest: 8) binder: 29102:29103 transaction failed 29201/-28, size 72-24 line 3137 binder: undelivered TRANSACTION_ERROR: 29201 binder_alloc: 22246: binder_alloc_buf size 96 failed, no address space binder_alloc: allocated: 12280 (num: 120 largest: 1024), free: 8 (num: 1 largest: 8) binder_alloc: 22246: binder_alloc_buf size 96 failed, no address space binder: 29107:29109 transaction failed 29201/-28, size 72-24 line 3137 binder_alloc: allocated: 12280 (num: 120 largest: 1024), free: 8 (num: 1 largest: 8) binder: 29108:29110 transaction failed 29201/-28, size 72-24 line 3137 binder: undelivered TRANSACTION_ERROR: 29201 binder_alloc: 22246: binder_alloc_buf size 96 failed, no address space binder: undelivered TRANSACTION_ERROR: 29201 binder_alloc: allocated: 12280 (num: 120 largest: 1024), free: 8 (num: 1 largest: 8) binder: 29107:29109 transaction failed 29201/-28, size 72-24 line 3137 binder: undelivered TRANSACTION_ERROR: 29201 binder_alloc: 22246: binder_alloc_buf size 96 failed, no address space binder_alloc: allocated: 12280 (num: 120 largest: 1024), free: 8 (num: 1 largest: 8) binder: 29116:29117 transaction failed 29201/-28, size 72-24 line 3137 binder: undelivered TRANSACTION_ERROR: 29201 audit_printk_skb: 1308 callbacks suppressed audit: type=1400 audit(1567312305.224:34496): avc: denied { search } for pid=29121 comm="syz-executor.3" name="newroot" dev="tmpfs" ino=6891 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:scanner_device_t:s0 tclass=dir permissive=1 audit: type=1400 audit(1567312305.304:34497): avc: denied { search } for pid=29121 comm="syz-executor.3" name="newroot" dev="tmpfs" ino=6891 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:scanner_device_t:s0 tclass=dir permissive=1 audit: type=1400 audit(1567312305.354:34498): avc: denied { search } for pid=29121 comm="syz-executor.3" name="1063" dev="tmpfs" ino=109020 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:scanner_device_t:s0 tclass=dir permissive=1 audit: audit_lost=33189 audit_rate_limit=0 audit_backlog_limit=64 audit: type=1400 audit(1567312305.434:34500): avc: denied { create } for pid=29127 comm="syz-executor.0" 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(1567312305.434:34501): avc: denied { write } for pid=29127 comm="syz-executor.0" 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(1567312305.434:34502): avc: denied { read } for pid=29127 comm="syz-executor.0" 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: printk limit exceeded audit: type=1400 audit(1567312305.514:34503): avc: denied { search } for pid=29121 comm="syz-executor.3" name="1063" dev="tmpfs" ino=109020 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:scanner_device_t:s0 tclass=dir permissive=1 audit: type=1400 audit(1567312305.544:34504): avc: denied { write search } for pid=29121 comm="syz-executor.3" name="1063" dev="tmpfs" ino=109020 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:scanner_device_t:s0 tclass=dir permissive=1 binder_alloc: 22246: binder_alloc_buf size 96 failed, no address space binder_alloc: allocated: 12280 (num: 120 largest: 1024), free: 8 (num: 1 largest: 8) binder_alloc: 22246: binder_alloc_buf size 96 failed, no address space binder: 29135:29140 transaction failed 29201/-28, size 72-24 line 3137 binder_alloc: allocated: 12280 (num: 120 largest: 1024), free: 8 (num: 1 largest: 8) binder: 29134:29142 transaction failed 29201/-28, size 72-24 line 3137 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29201 binder_alloc: 22246: binder_alloc_buf size 96 failed, no address space binder_alloc: allocated: 12280 (num: 120 largest: 1024), free: 8 (num: 1 largest: 8) binder: 29164:29166 transaction failed 29201/-28, size 72-24 line 3137 binder: undelivered TRANSACTION_ERROR: 29201 binder_alloc: 22246: binder_alloc_buf size 96 failed, no address space binder_alloc: allocated: 12280 (num: 120 largest: 1024), free: 8 (num: 1 largest: 8) binder: 29173:29175 transaction failed 29201/-28, size 72-24 line 3137 binder: undelivered TRANSACTION_ERROR: 29201 binder: 29185:29193 transaction failed 29201/-22, size -2645583306103455672-4655995526536476825 line 3137 binder: undelivered TRANSACTION_ERROR: 29201 binder: 29208:29210 BC_ACQUIRE_DONE u0000000000000000 no match binder: 29208:29210 DecRefs 0 refcount change on invalid ref 1 ret -22 binder: 29208:29210 unknown command 1284713106 binder: 29208:29210 ioctl c0306201 20000440 returned -22 audit_printk_skb: 1137 callbacks suppressed audit: type=1400 audit(1567312310.314:34884): avc: denied { read } for pid=29208 comm="syz-executor.3" 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(1567312310.344:34885): avc: denied { search } for pid=29208 comm="syz-executor.3" name="newroot" dev="tmpfs" ino=6891 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:scanner_device_t:s0 tclass=dir permissive=1 audit: type=1400 audit(1567312310.374:34886): avc: denied { search } for pid=29208 comm="syz-executor.3" name="newroot" dev="tmpfs" ino=6891 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:scanner_device_t:s0 tclass=dir permissive=1 binder: 29208:29217 BC_ACQUIRE_DONE u0000000000000000 no match binder: 29208:29217 DecRefs 0 refcount change on invalid ref 1 ret -22 binder: 29208:29214 unknown command 1284713106 binder: 29208:29214 ioctl c0306201 20000440 returned -22 audit: type=1400 audit(1567312310.454:34887): avc: denied { search } for pid=2119 comm="syz-executor.3" name="newroot" dev="tmpfs" ino=6891 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:scanner_device_t:s0 tclass=dir permissive=1 audit: type=1400 audit(1567312310.484:34888): avc: denied { search } for pid=2119 comm="syz-executor.3" name="newroot" dev="tmpfs" ino=6891 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:scanner_device_t:s0 tclass=dir permissive=1 audit: type=1400 audit(1567312310.504:34889): avc: denied { search } for pid=2119 comm="syz-executor.3" name="newroot" dev="tmpfs" ino=6891 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:scanner_device_t:s0 tclass=dir permissive=1 audit: type=1400 audit(1567312310.534:34890): avc: denied { search } for pid=2119 comm="syz-executor.3" name="newroot" dev="tmpfs" ino=6891 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:scanner_device_t:s0 tclass=dir permissive=1 audit: type=1400 audit(1567312310.554:34891): avc: denied { read } for pid=2119 comm="syz-executor.3" name="1067" dev="tmpfs" ino=109898 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:scanner_device_t:s0 tclass=dir permissive=1 audit: type=1400 audit(1567312310.584:34892): avc: denied { read open } for pid=2119 comm="syz-executor.3" path="/1067" dev="tmpfs" ino=109898 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:scanner_device_t:s0 tclass=dir permissive=1 audit: type=1400 audit(1567312310.614:34893): avc: denied { getattr } for pid=2119 comm="syz-executor.3" path="/1067" dev="tmpfs" ino=109898 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:scanner_device_t:s0 tclass=dir permissive=1