====================================================== WARNING: possible circular locking dependency detected 4.15.0-rc2+ #215 Not tainted ------------------------------------------------------ syz-executor1/25003 is trying to acquire lock: (&sb->s_type->i_mutex_key#10){++++}, at: [<00000000e651fa7d>] inode_lock include/linux/fs.h:713 [inline] (&sb->s_type->i_mutex_key#10){++++}, at: [<00000000e651fa7d>] generic_file_write_iter+0xdc/0x7a0 mm/filemap.c:3289 but task is already holding lock: (&pipe->mutex/1){+.+.}, at: [<000000004b245915>] pipe_lock_nested fs/pipe.c:67 [inline] (&pipe->mutex/1){+.+.}, at: [<000000004b245915>] pipe_lock+0x56/0x70 fs/pipe.c:75 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #6 (&pipe->mutex/1){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4004 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16f/0x1a80 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 pipe_lock_nested fs/pipe.c:67 [inline] pipe_lock+0x56/0x70 fs/pipe.c:75 iter_file_splice_write+0x264/0xf30 fs/splice.c:699 do_splice_from fs/splice.c:851 [inline] do_splice fs/splice.c:1147 [inline] SYSC_splice fs/splice.c:1402 [inline] SyS_splice+0x7d5/0x1630 fs/splice.c:1382 entry_SYSCALL_64_fastpath+0x1f/0x96 -> #5 (sb_writers){.+.+}: rq_lock kernel/sched/sched.h:1766 [inline] __schedule+0x24e/0x2060 kernel/sched/core.c:3312 schedule+0xf5/0x430 kernel/sched/core.c:3434 devtmpfsd+0x420/0x4b0 drivers/base/devtmpfs.c:408 kthread+0x37a/0x440 kernel/kthread.c:238 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:441 -> #4 ((completion)&req.done){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4004 complete_acquire include/linux/completion.h:40 [inline] __wait_for_common kernel/sched/completion.c:109 [inline] wait_for_common kernel/sched/completion.c:123 [inline] wait_for_completion+0xcb/0x7b0 kernel/sched/completion.c:144 devtmpfs_create_node+0x32b/0x4a0 drivers/base/devtmpfs.c:115 device_add+0x120f/0x1640 drivers/base/core.c:1824 device_create_groups_vargs+0x1f3/0x250 drivers/base/core.c:2430 device_create_vargs drivers/base/core.c:2470 [inline] device_create+0xda/0x110 drivers/base/core.c:2506 msr_device_create+0x26/0x40 arch/x86/kernel/msr.c:188 cpuhp_invoke_callback+0x2ea/0x1d20 kernel/cpu.c:182 cpuhp_thread_fun+0x48e/0x7e0 kernel/cpu.c:571 smpboot_thread_fn+0x450/0x7c0 kernel/smpboot.c:164 kthread+0x37a/0x440 kernel/kthread.c:238 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:441 -> #3 (cpuhp_state-up){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4004 cpuhp_lock_acquire kernel/cpu.c:85 [inline] cpuhp_invoke_ap_callback kernel/cpu.c:605 [inline] cpuhp_issue_call+0x1e5/0x520 kernel/cpu.c:1495 __cpuhp_setup_state_cpuslocked+0x282/0x600 kernel/cpu.c:1642 __cpuhp_setup_state+0xb0/0x140 kernel/cpu.c:1671 cpuhp_setup_state include/linux/cpuhotplug.h:201 [inline] page_writeback_init+0x4d/0x71 mm/page-writeback.c:2081 pagecache_init+0x48/0x4f mm/filemap.c:977 start_kernel+0x6bc/0x74f init/main.c:690 x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:378 x86_64_start_kernel+0x77/0x7a arch/x86/kernel/head64.c:359 secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:237 -> #2 (cpuhp_state_mutex){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4004 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16f/0x1a80 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 __cpuhp_setup_state_cpuslocked+0x5b/0x600 kernel/cpu.c:1617 __cpuhp_setup_state+0xb0/0x140 kernel/cpu.c:1671 cpuhp_setup_state_nocalls include/linux/cpuhotplug.h:229 [inline] kvm_guest_init+0x1f3/0x20f arch/x86/kernel/kvm.c:528 setup_arch+0x17e8/0x1a02 arch/x86/kernel/setup.c:1266 start_kernel+0xa5/0x74f init/main.c:530 x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:378 x86_64_start_kernel+0x77/0x7a arch/x86/kernel/head64.c:359 secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:237 -> #1 (cpu_hotplug_lock.rw_sem){++++}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4004 percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] cpus_read_lock+0x42/0x90 kernel/cpu.c:293 get_online_cpus include/linux/cpu.h:117 [inline] lru_add_drain_all+0xe/0x20 mm/swap.c:729 shmem_wait_for_pins mm/shmem.c:2672 [inline] shmem_add_seals+0x3df/0x1060 mm/shmem.c:2780 shmem_fcntl+0xfe/0x130 mm/shmem.c:2815 do_fcntl+0x73e/0x1160 fs/fcntl.c:421 SYSC_fcntl fs/fcntl.c:463 [inline] SyS_fcntl+0xdc/0x120 fs/fcntl.c:448 entry_SYSCALL_64_fastpath+0x1f/0x96 -> #0 (&sb->s_type->i_mutex_key#10){++++}: check_prevs_add kernel/locking/lockdep.c:2031 [inline] validate_chain kernel/locking/lockdep.c:2473 [inline] __lock_acquire+0x3498/0x47f0 kernel/locking/lockdep.c:3500 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4004 down_write+0x87/0x120 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:713 [inline] generic_file_write_iter+0xdc/0x7a0 mm/filemap.c:3289 call_write_iter include/linux/fs.h:1772 [inline] do_iter_readv_writev+0x531/0x7f0 fs/read_write.c:653 do_iter_write+0x15a/0x540 fs/read_write.c:932 vfs_iter_write+0x77/0xb0 fs/read_write.c:945 iter_file_splice_write+0x7db/0xf30 fs/splice.c:749 do_splice_from fs/splice.c:851 [inline] do_splice fs/splice.c:1147 [inline] SYSC_splice fs/splice.c:1402 [inline] SyS_splice+0x7d5/0x1630 fs/splice.c:1382 entry_SYSCALL_64_fastpath+0x1f/0x96 other info that might help us debug this: Chain exists of: &sb->s_type->i_mutex_key#10 --> sb_writers --> &pipe->mutex/1 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&pipe->mutex/1); lock(sb_writers); lock(&pipe->mutex/1); lock(&sb->s_type->i_mutex_key#10); *** DEADLOCK *** 2 locks held by syz-executor1/25003: #0: (sb_writers#6){.+.+}, at: [<00000000eaf16e15>] file_start_write include/linux/fs.h:2715 [inline] #0: (sb_writers#6){.+.+}, at: [<00000000eaf16e15>] do_splice fs/splice.c:1146 [inline] #0: (sb_writers#6){.+.+}, at: [<00000000eaf16e15>] SYSC_splice fs/splice.c:1402 [inline] #0: (sb_writers#6){.+.+}, at: [<00000000eaf16e15>] SyS_splice+0x1117/0x1630 fs/splice.c:1382 #1: (&pipe->mutex/1){+.+.}, at: [<000000004b245915>] pipe_lock_nested fs/pipe.c:67 [inline] #1: (&pipe->mutex/1){+.+.}, at: [<000000004b245915>] pipe_lock+0x56/0x70 fs/pipe.c:75 stack backtrace: CPU: 0 PID: 25003 Comm: syz-executor1 Not tainted 4.15.0-rc2+ #215 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_circular_bug+0x42d/0x610 kernel/locking/lockdep.c:1271 check_prev_add+0x666/0x15f0 kernel/locking/lockdep.c:1914 check_prevs_add kernel/locking/lockdep.c:2031 [inline] validate_chain kernel/locking/lockdep.c:2473 [inline] __lock_acquire+0x3498/0x47f0 kernel/locking/lockdep.c:3500 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4004 down_write+0x87/0x120 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:713 [inline] generic_file_write_iter+0xdc/0x7a0 mm/filemap.c:3289 call_write_iter include/linux/fs.h:1772 [inline] do_iter_readv_writev+0x531/0x7f0 fs/read_write.c:653 do_iter_write+0x15a/0x540 fs/read_write.c:932 vfs_iter_write+0x77/0xb0 fs/read_write.c:945 iter_file_splice_write+0x7db/0xf30 fs/splice.c:749 do_splice_from fs/splice.c:851 [inline] do_splice fs/splice.c:1147 [inline] SYSC_splice fs/splice.c:1402 [inline] SyS_splice+0x7d5/0x1630 fs/splice.c:1382 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x452a39 RSP: 002b:00007fb40a747c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 0000000000758020 RCX: 0000000000452a39 RDX: 0000000000000016 RSI: 0000000000000000 RDI: 0000000000000017 RBP: 0000000000000586 R08: 00000000fffffdff R09: 0000000000000000 R10: 0000000000800000 R11: 0000000000000212 R12: 00000000006f6530 R13: 00000000ffffffff R14: 00007fb40a7486d4 R15: 0000000000000000 loop_reread_partitions: partition scan of loop0 (-\t@r9hxGQ:[il L*@R-Tr-x) failed (rc=-13) rpcbind: RPC call returned error 22 rpcbind: RPC call returned error 22 device syz6 entered promiscuous mode kvm [25009]: vcpu0, guest rIP: 0x9115 ignored wrmsr: 0x11e data 0x0 kvm [25009]: vcpu0, guest rIP: 0x9115 disabled perfctr wrmsr: 0xc2 data 0x0 kvm [25009]: vcpu0, guest rIP: 0x9115 disabled perfctr wrmsr: 0xc1 data 0x0 nla_parse: 4 callbacks suppressed netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. device syz7 entered promiscuous mode kvm [25103]: vcpu0, guest rIP: 0x9115 ignored wrmsr: 0x11e data 0x0 kvm [25103]: vcpu0, guest rIP: 0x9115 disabled perfctr wrmsr: 0xc2 data 0x0 kvm [25103]: vcpu0, guest rIP: 0x9115 disabled perfctr wrmsr: 0xc1 data 0x0 Can not set IPV6_FL_F_REFLECT if flowlabel_consistency sysctl is enable QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl 9pnet_virtio: no channels available for device ./file0 QAT: Invalid ioctl 9pnet_virtio: no channels available for device ./file0 kauditd_printk_skb: 63 callbacks suppressed audit: type=1326 audit(1512916115.173:4732): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25195 comm="" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452a39 code=0x7ffc0000 Can not set IPV6_FL_F_REFLECT if flowlabel_consistency sysctl is enable audit: type=1326 audit(1512916115.180:4733): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25195 comm="" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452a39 code=0x7ffc0000 audit: type=1326 audit(1512916115.205:4734): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25195 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=228 compat=0 ip=0x4557da code=0x7ffc0000 audit: type=1326 audit(1512916115.206:4735): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25195 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452a39 code=0x7ffc0000 audit: type=1326 audit(1512916115.207:4736): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25195 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452a39 code=0x7ffc0000 audit: type=1326 audit(1512916115.207:4737): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25195 comm="" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=2 compat=0 ip=0x40cd71 code=0x7ffc0000 audit: type=1326 audit(1512916115.208:4738): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25195 comm="" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452a39 code=0x7ffc0000 audit: type=1326 audit(1512916115.208:4739): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25195 comm="" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452a39 code=0x7ffc0000 netlink: 14 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 14 bytes leftover after parsing attributes in process `syz-executor1'. audit: type=1326 audit(1512916115.209:4740): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25195 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=228 compat=0 ip=0x4557da code=0x7ffc0000 audit: type=1326 audit(1512916115.210:4741): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25195 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x452a39 code=0x7ffc0000 Can not set IPV6_FL_F_REFLECT if flowlabel_consistency sysctl is enable device gre0 entered promiscuous mode Can not set IPV6_FL_F_REFLECT if flowlabel_consistency sysctl is enable binder: 25405:25408 transaction failed 29189/-22, size 0-0 line 2775 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: binder_alloc_mmap_handler: 25405 20000000-20001000 already mapped failed -16 binder: 25405:25408 transaction failed 29189/-22, size 0-0 line 2775 binder: undelivered TRANSACTION_ERROR: 29189 syz-executor4 (25441): attempted to duplicate a private mapping with mremap. This is not supported. QAT: Invalid ioctl QAT: Invalid ioctl device syz3 entered promiscuous mode binder: 25517:25520 IncRefs 0 refcount change on invalid ref 2 ret -22 binder: 25517:25520 got reply transaction with no transaction stack binder: 25517:25520 transaction failed 29201/-71, size 48-56 line 2690 binder: 25517:25520 ERROR: BC_REGISTER_LOOPER called without request binder: 25517:25520 got transaction to invalid handle binder: 25517:25520 transaction failed 29201/-22, size 40-56 line 2775 binder: 25517:25536 IncRefs 0 refcount change on invalid ref 2 ret -22 binder: 25517:25536 got reply transaction with no transaction stack binder: 25517:25536 transaction failed 29201/-71, size 48-56 line 2690 binder: BINDER_SET_CONTEXT_MGR already set binder: 25517:25536 ioctl 40046207 0 returned -16 binder: 25517:25536 ERROR: BC_REGISTER_LOOPER called without request binder_alloc: 25517: binder_alloc_buf, no vma binder: 25517:25520 transaction failed 29189/-3, size 0-0 line 2890 binder: 25517:25536 got transaction to invalid handle binder: 25517:25536 transaction failed 29201/-22, size 40-56 line 2775 binder: undelivered TRANSACTION_ERROR: 29189 binder: send failed reply for transaction 206 to 25517:25520 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 QAT: Invalid ioctl device gre0 entered promiscuous mode QAT: Invalid ioctl QAT: Invalid ioctl device gre0 entered promiscuous mode sctp: [Deprecated]: syz-executor5 (pid 25708) Use of int in maxseg socket option. Use struct sctp_assoc_value instead QAT: Invalid ioctl device gre0 entered promiscuous mode sctp: [Deprecated]: syz-executor5 (pid 25708) Use of int in maxseg socket option. Use struct sctp_assoc_value instead QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl dccp_v4_rcv: dropped packet with invalid checksum dccp_v4_rcv: dropped packet with invalid checksum QAT: Invalid ioctl QAT: Invalid ioctl nla_parse: 13 callbacks suppressed netlink: 64 bytes leftover after parsing attributes in process `syz-executor1'. QAT: Invalid ioctl QAT: Invalid ioctl netlink: 64 bytes leftover after parsing attributes in process `syz-executor1'. QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl sctp: [Deprecated]: syz-executor3 (pid 25962) Use of int in max_burst socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor3 (pid 25975) Use of int in max_burst socket option. Use struct sctp_assoc_value instead QAT: Invalid ioctl kvm: emulating exchange as write QAT: Invalid ioctl binder: 26006:26021 got reply transaction with bad transaction stack, transaction 212 has target 26006:0 binder: 26006:26021 transaction failed 29201/-71, size 32-8 line 2705 QAT: Invalid ioctl binder: 26006:26021 ioctl c0306201 2000dfd0 returned -14 QAT: Invalid ioctl binder: release 26006:26021 transaction 212 out, still active binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 212, target dead binder_alloc: 26006: binder_alloc_buf, no vma binder: 26006:26008 transaction failed 29189/-3, size 0-0 line 2890 binder: 26006:26027 got reply transaction with no transaction stack binder: 26006:26027 transaction failed 29201/-71, size 32-8 line 2690 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 device gre0 entered promiscuous mode QAT: Invalid ioctl device gre0 entered promiscuous mode QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl sctp: [Deprecated]: syz-executor6 (pid 26121) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead QAT: Invalid ioctl QAT: Invalid ioctl sctp: [Deprecated]: syz-executor6 (pid 26142) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead QAT: Invalid ioctl QAT: Invalid ioctl netlink: 5 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 5 bytes leftover after parsing attributes in process `syz-executor4'. QAT: Invalid ioctl QAT: Invalid ioctl device syz2 entered promiscuous mode netlink: 'syz-executor1': attribute type 16 has an invalid length. netlink: 'syz-executor1': attribute type 16 has an invalid length. QAT: Invalid ioctl QAT: Invalid ioctl netlink: 3 bytes leftover after parsing attributes in process `syz-executor2'. device eql entered promiscuous mode netlink: 5 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 11 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor2'. device eql entered promiscuous mode netlink: 5 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor5'. IPv6: NLM_F_REPLACE set, but no existing node found! kauditd_printk_skb: 249 callbacks suppressed audit: type=1400 audit(1512916122.687:4991): avc: denied { net_bind_service } for pid=26591 comm="syz-executor2" capability=10 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 kvm [26624]: vcpu0, guest rIP: 0xfff0 unimplemented MMIO_CONF_BASE wrmsr: 0x2 kvm [26624]: vcpu0, guest rIP: 0xfff0 unimplemented MMIO_CONF_BASE wrmsr: 0x2 device lo entered promiscuous mode device gre0 entered promiscuous mode