====================================================== WARNING: possible circular locking dependency detected 4.15.0-rc2+ #216 Not tainted ------------------------------------------------------ syz-executor7/8848 is trying to acquire lock: (console_lock){+.+.}, at: [<000000001c8cd30e>] vcs_read+0x129/0xae0 drivers/tty/vt/vc_screen.c:219 but task is already holding lock: (&pipe->mutex/1){+.+.}, at: [<00000000dd7fc330>] pipe_lock_nested fs/pipe.c:67 [inline] (&pipe->mutex/1){+.+.}, at: [<00000000dd7fc330>] pipe_lock+0x56/0x70 fs/pipe.c:75 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&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 -> #2 (sb_writers){.+.+}: spin_lock include/linux/spinlock.h:315 [inline] fast_dput fs/dcache.c:687 [inline] dput.part.23+0x492/0x830 fs/dcache.c:794 dput+0x1f/0x30 fs/dcache.c:787 path_put fs/namei.c:500 [inline] done_path_create+0xad/0x110 fs/namei.c:3676 handle_create+0x196/0x760 drivers/base/devtmpfs.c:226 handle drivers/base/devtmpfs.c:373 [inline] devtmpfsd+0x3b4/0x4b0 drivers/base/devtmpfs.c:399 -> #1 ((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 vcs_make_sysfs+0x35/0x60 drivers/tty/vt/vc_screen.c:629 vc_allocate+0x4b7/0x6b0 drivers/tty/vt/vt.c:797 con_install+0x52/0x440 drivers/tty/vt/vt.c:2876 tty_driver_install_tty drivers/tty/tty_io.c:1215 [inline] tty_init_dev+0xf6/0x4a0 drivers/tty/tty_io.c:1315 tty_open_by_driver drivers/tty/tty_io.c:1942 [inline] tty_open+0x608/0xab0 drivers/tty/tty_io.c:1990 chrdev_open+0x257/0x730 fs/char_dev.c:417 do_dentry_open+0x682/0xd70 fs/open.c:752 vfs_open+0x107/0x230 fs/open.c:866 do_last fs/namei.c:3379 [inline] path_openat+0x1157/0x3530 fs/namei.c:3519 do_filp_open+0x25b/0x3b0 fs/namei.c:3554 do_sys_open+0x502/0x6d0 fs/open.c:1059 SYSC_open fs/open.c:1077 [inline] SyS_open+0x2d/0x40 fs/open.c:1072 entry_SYSCALL_64_fastpath+0x1f/0x96 -> #0 (console_lock){+.+.}: 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 console_lock+0x4b/0x80 kernel/printk/printk.c:2047 vcs_read+0x129/0xae0 drivers/tty/vt/vc_screen.c:219 do_loop_readv_writev fs/read_write.c:673 [inline] do_iter_read+0x3db/0x5b0 fs/read_write.c:897 vfs_readv+0x121/0x1c0 fs/read_write.c:959 kernel_readv fs/splice.c:361 [inline] default_file_splice_read+0x508/0xae0 fs/splice.c:416 do_splice_to+0x110/0x170 fs/splice.c:880 do_splice fs/splice.c:1173 [inline] SYSC_splice fs/splice.c:1402 [inline] SyS_splice+0x11a8/0x1630 fs/splice.c:1382 entry_SYSCALL_64_fastpath+0x1f/0x96 other info that might help us debug this: Chain exists of: console_lock --> sb_writers --> &pipe->mutex/1 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&pipe->mutex/1); lock(sb_writers); lock(&pipe->mutex/1); lock(console_lock); *** DEADLOCK *** 1 lock held by syz-executor7/8848: #0: (&pipe->mutex/1){+.+.}, at: [<00000000dd7fc330>] pipe_lock_nested fs/pipe.c:67 [inline] #0: (&pipe->mutex/1){+.+.}, at: [<00000000dd7fc330>] pipe_lock+0x56/0x70 fs/pipe.c:75 stack backtrace: CPU: 0 PID: 8848 Comm: syz-executor7 Not tainted 4.15.0-rc2+ #216 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 console_lock+0x4b/0x80 kernel/printk/printk.c:2047 vcs_read+0x129/0xae0 drivers/tty/vt/vc_screen.c:219 do_loop_readv_writev fs/read_write.c:673 [inline] do_iter_read+0x3db/0x5b0 fs/read_write.c:897 vfs_readv+0x121/0x1c0 fs/read_write.c:959 kernel_readv fs/splice.c:361 [inline] default_file_splice_read+0x508/0xae0 fs/splice.c:416 do_splice_to+0x110/0x170 fs/splice.c:880 do_splice fs/splice.c:1173 [inline] SYSC_splice fs/splice.c:1402 [inline] SyS_splice+0x11a8/0x1630 fs/splice.c:1382 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x452a39 RSP: 002b:00007f2d70f0ac58 EFLAGS: 00000212 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 0000000000758020 RCX: 0000000000452a39 RDX: 0000000000000018 RSI: 0000000000000000 RDI: 0000000000000016 RBP: 0000000000000307 R08: 0000000000000058 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f2948 R13: 00000000ffffffff R14: 00007f2d70f0b6d4 R15: 0000000000000000 netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. device lo left promiscuous mode netlink: 8 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 'syz-executor7': attribute type 29 has an invalid length. netlink: 'syz-executor7': attribute type 29 has an invalid length. device gre0 entered promiscuous mode device syz0 entered promiscuous mode QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl irq bypass consumer (token 0000000009675d4e) registration fails: -16 kauditd_printk_skb: 114 callbacks suppressed audit: type=1400 audit(1512947808.748:693): avc: denied { map_create } for pid=9644 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 9pnet_virtio: no channels available for device ./file0 9pnet_virtio: no channels available for device ./file0 device lo entered promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode nla_parse: 16 callbacks suppressed netlink: 9 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 9 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 'syz-executor4': attribute type 29 has an invalid length. netlink: 5 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 'syz-executor4': attribute type 29 has an invalid length. netlink: 5 bytes leftover after parsing attributes in process `syz-executor4'. sock: process `syz-executor2' is using obsolete setsockopt SO_BSDCOMPAT audit: type=1400 audit(1512947810.739:694): avc: denied { attach_queue } for pid=10006 comm="syz-executor0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=tun_socket permissive=1 netlink: 10 bytes leftover after parsing attributes in process `syz-executor7'. binder: release 10006:10009 transaction 49 out, still active binder: undelivered TRANSACTION_COMPLETE binder: BINDER_SET_CONTEXT_MGR already set binder: 10006:10009 ioctl 40046207 0 returned -16 binder_alloc: 10006: binder_alloc_buf, no vma binder: 10006:10009 transaction failed 29189/-3, size 0-0 line 2890 binder: undelivered TRANSACTION_ERROR: 29189 netlink: 10 bytes leftover after parsing attributes in process `syz-executor7'. binder: send failed reply for transaction 49, target dead QAT: Invalid ioctl QAT: Invalid ioctl irq bypass consumer (token 0000000071bd6832) registration fails: -16 irq bypass consumer (token 0000000096d99cac) registration fails: -16 loop_reread_partitions: partition scan of loop0 (-\t@r9hxGQ:[il L*@R-Tr-x) failed (rc=-13) kvm_pmu: event creation failed -2 SELinux: unrecognized netlink message: protocol=6 nlmsg_type=65531 sclass=netlink_xfrm_socket pig=10204 comm=syz-executor5 SELinux: unrecognized netlink message: protocol=6 nlmsg_type=65531 sclass=netlink_xfrm_socket pig=10204 comm=syz-executor5 binder: 10355:10360 ioctl 40046205 0 returned -22 binder: 10355:10360 ioctl 40046205 4000000000000006 returned -22 binder: 10355:10376 ioctl 40046205 0 returned -22 binder: 10382:10383 BC_CLEAR_DEATH_NOTIFICATION death notification not active binder: 10382:10383 BC_DEAD_BINDER_DONE 0000000000000000 not found binder: 10382:10383 got reply transaction with no transaction stack binder: 10382:10383 transaction failed 29201/-71, size 0-16 line 2690 binder: 10382:10383 BC_CLEAR_DEATH_NOTIFICATION invalid ref 0 device gre0 entered promiscuous mode binder: 10382:10383 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 10382:10383 BC_DEAD_BINDER_DONE 0000000000000000 not found binder: 10382:10383 Release 1 refcount change on invalid ref 0 ret -22 binder: 10382:10383 got reply transaction with no transaction stack binder: 10382:10383 transaction failed 29201/-71, size 0-16 line 2690 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29201 device gre0 entered promiscuous mode binder: 10435:10436 got transaction with invalid offset (40, min 0 max 80) or object. binder: 10435:10436 transaction failed 29201/-22, size 80-8 line 2953 binder: BINDER_SET_CONTEXT_MGR already set binder: 10435:10436 ioctl 40046207 0 returned -16 binder: binder_mmap: 10435 204c6000-204c7000 bad vm_flags failed -1 audit: type=1400 audit(1512947812.540:695): avc: denied { setattr } for pid=10420 comm="syz-executor7" name="exec" dev="proc" ino=35099 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=file permissive=1 binder_alloc: binder_alloc_mmap_handler: 10435 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 10435:10436 ioctl 40046207 0 returned -16 binder_alloc: 10435: binder_alloc_buf, no vma binder: 10435:10443 transaction failed 29189/-3, size 80-8 line 2890 binder: BINDER_SET_CONTEXT_MGR already set binder: 10435:10436 ioctl 40046207 0 returned -16 binder: binder_mmap: 10435 204c6000-204c7000 bad vm_flags failed -1 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 netlink: 1 bytes leftover after parsing attributes in process `syz-executor4'. sctp: [Deprecated]: syz-executor5 (pid 10480) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor5 (pid 10488) Use of int in maxseg socket option. Use struct sctp_assoc_value instead binder: 10494:10498 ioctl 40046205 6 returned -22 QAT: Invalid ioctl binder: 10494:10506 ioctl c0306201 20008fd0 returned -14 sctp: [Deprecated]: syz-executor5 (pid 10518) Use of int in maxseg socket option. Use struct sctp_assoc_value instead QAT: Invalid ioctl binder: 10532:10533 ioctl 40286608 800004 returned -22 binder: 10532:10533 ioctl 40046205 3 returned -22 binder: 10532:10533 ioctl 40046205 3 returned -22 sctp: [Deprecated]: syz-executor5 (pid 10539) Use of int in maxseg socket option. Use struct sctp_assoc_value instead binder: 10532:10548 ERROR: BC_REGISTER_LOOPER called without request binder: 10548 RLIMIT_NICE not set binder: 10548 RLIMIT_NICE not set binder: 10532:10533 got reply transaction with no transaction stack audit: type=1400 audit(1512947813.048:696): avc: denied { map_read map_write } for pid=10559 comm="syz-executor7" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 binder: 10532:10548 Release 1 refcount change on invalid ref 1 ret -22 binder: 10532:10548 got transaction to invalid handle binder: 10532:10548 transaction failed 29201/-22, size 24-32 line 2775 binder: 10532:10548 ioctl 40046205 7098 returned -22 binder: 10532:10548 got transaction to invalid handle binder: 10532:10548 transaction failed 29201/-22, size 0-40 line 2775 binder: 10532:10533 transaction failed 29201/-71, size 32-8 line 2690 binder: 10532:10557 ioctl 40286608 800004 returned -22 binder: 10532:10548 ioctl 40046205 3 returned -22 binder: 10532:10557 ioctl 40046205 3 returned -22 QAT: Invalid ioctl binder: undelivered TRANSACTION_ERROR: 29201 binder: 10532:10533 ERROR: BC_REGISTER_LOOPER called without request binder: 10533 RLIMIT_NICE not set QAT: Invalid ioctl binder: 10533 RLIMIT_NICE not set binder: 10532:10548 got reply transaction with bad transaction stack, transaction 66 has target 10532:10533 binder: 10532:10548 transaction failed 29201/-71, size 32-8 line 2705 binder: 10532:10548 Release 1 refcount change on invalid ref 1 ret -22 binder: 10532:10548 got transaction to invalid handle binder: 10532:10548 transaction failed 29201/-22, size 24-32 line 2775 QAT: Invalid ioctl binder: 10532:10533 ioctl 40046205 7098 returned -22 QAT: Invalid ioctl binder: release 10532:10548 transaction 61 in, still active binder: send failed reply for transaction 61 to 10532:10557 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: release 10532:10533 transaction 66 in, still active binder: send failed reply for transaction 66 to 10532:10548 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29189 netlink: 3 bytes leftover after parsing attributes in process `syz-executor2'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=10805 comm=syz-executor2 QAT: Invalid ioctl QAT: Invalid ioctl audit: type=1400 audit(1512947814.237:697): avc: denied { map } for pid=10927 comm="syz-executor0" path="/proc/853/net/fib_triestat" dev="proc" ino=4026532320 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:proc_net_t:s0 tclass=file permissive=1 audit: type=1400 audit(1512947814.273:698): avc: denied { map } for pid=10931 comm="syz-executor5" path="socket:[35610]" dev="sockfs" ino=35610 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_route_socket permissive=1 FAULT_FLAG_ALLOW_RETRY missing 30 CPU: 1 PID: 10949 Comm: syz-executor2 Not tainted 4.15.0-rc2+ #216 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 handle_userfault+0x12fa/0x24c0 fs/userfaultfd.c:427 do_anonymous_page mm/memory.c:3121 [inline] handle_pte_fault mm/memory.c:3934 [inline] __handle_mm_fault+0x353a/0x3e20 mm/memory.c:4060 handle_mm_fault+0x334/0x8d0 mm/memory.c:4097 __do_page_fault+0x5c9/0xc90 arch/x86/mm/fault.c:1429 do_page_fault+0xee/0x720 arch/x86/mm/fault.c:1504 page_fault+0x22/0x30 arch/x86/entry/entry_64.S:1094 RIP: 0010:fault_in_pages_readable include/linux/pagemap.h:601 [inline] RIP: 0010:iov_iter_fault_in_readable+0x1a7/0x410 lib/iov_iter.c:421 RSP: 0018:ffff8801cef7f928 EFLAGS: 00010246 RAX: 0000000000010000 RBX: 0000000020011fd2 RCX: ffffffff8250b3a1 RDX: 00000000000000c3 RSI: ffffc90002d2f000 RDI: ffff8801cef7fd28 RBP: ffff8801cef7fa08 R08: 1ffff1003b326c6a R09: 1ffff10039deff1a R10: ffff8801d2f9c1c0 R11: 0000000000000000 R12: 1ffff10039deff28 R13: ffff8801cef7f9e0 R14: 0000000000000000 R15: ffff8801cef7fd20 generic_perform_write+0x200/0x600 mm/filemap.c:3129 __generic_file_write_iter+0x366/0x5b0 mm/filemap.c:3264 generic_file_write_iter+0x399/0x7a0 mm/filemap.c:3292 call_write_iter include/linux/fs.h:1772 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x68a/0x970 fs/read_write.c:482 vfs_write+0x18f/0x510 fs/read_write.c:544 SYSC_write fs/read_write.c:589 [inline] SyS_write+0xef/0x220 fs/read_write.c:581 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x452a39 RSP: 002b:00007f73f5a43c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000758020 RCX: 0000000000452a39 RDX: 000000000000001c RSI: 0000000020011fd2 RDI: 0000000000000014 RBP: 000000000000039b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f3728 R13: 00000000ffffffff R14: 00007f73f5a446d4 R15: 0000000000000000