WARNING: possible circular locking dependency detected 4.15.0-rc1-next-20171128+ #54 Not tainted ------------------------------------------------------ syz-executor6/5063 is trying to acquire lock: (console_lock){+.+.}, at: [] vcs_read+0x129/0xae0 drivers/tty/vt/vc_screen.c:219 but task is already holding lock: (&pipe->mutex/1){+.+.}, at: [] pipe_lock_nested fs/pipe.c:67 [inline] (&pipe->mutex/1){+.+.}, at: [] 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){.+.+}: try_to_wake_up+0xbc/0x1600 kernel/sched/core.c:1989 -> #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:3388 [inline] path_openat+0x1157/0x3530 fs/namei.c:3528 do_filp_open+0x25b/0x3b0 fs/namei.c:3563 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-executor6/5063: #0: (&pipe->mutex/1){+.+.}, at: [] pipe_lock_nested fs/pipe.c:67 [inline] #0: (&pipe->mutex/1){+.+.}, at: [] pipe_lock+0x56/0x70 fs/pipe.c:75 stack backtrace: CPU: 0 PID: 5063 Comm: syz-executor6 Not tainted 4.15.0-rc1-next-20171128+ #54 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:0x4529d9 RSP: 002b:00007fa985f0ec58 EFLAGS: 00000212 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 0000000000758020 RCX: 00000000004529d9 RDX: 0000000000000015 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 000000000000008a R08: 0000000000000fff R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006edd90 R13: 00000000ffffffff R14: 00007fa985f0f6d4 R15: 0000000000000000 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=5065 comm=syz-executor7 QAT: Invalid ioctl do_dccp_getsockopt: sockopt(PACKET_SIZE) is deprecated: fix your app QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl do_dccp_getsockopt: sockopt(PACKET_SIZE) is deprecated: fix your app xprt_adjust_timeout: rq_timeout = 0! QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl xprt_adjust_timeout: rq_timeout = 0! SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=5148 comm=syz-executor7 QAT: failed to copy from user cfg_data. QAT: failed to copy from user cfg_data. nla_parse: 13 callbacks suppressed netlink: 1 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 1 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 2 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 2 bytes leftover after parsing attributes in process `syz-executor6'. semctl(GETNCNT/GETZCNT) is since 3.16 Single Unix Specification compliant. The task syz-executor4 (5413) triggered the difference, watch for misbehavior. kauditd_printk_skb: 91 callbacks suppressed audit: type=1326 audit(1511907936.140:100): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5434 comm="syz-executor4" exe="/root/syz-executor4" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4529d9 code=0xffff0000 audit: type=1326 audit(1511907936.231:101): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=5434 comm="syz-executor4" exe="/root/syz-executor4" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4529d9 code=0xffff0000 encrypted_key: insufficient parameters specified encrypted_key: insufficient parameters specified autofs4:pid:5584:check_dev_ioctl_version: ioctl control interface version mismatch: kernel(1.1), user(0.256), cmd(0x0000937e) QAT: Invalid ioctl autofs4:pid:5584:validate_dev_ioctl: invalid device control module version supplied for cmd(0x0000937e) QAT: Invalid ioctl autofs4:pid:5584:check_dev_ioctl_version: ioctl control interface version mismatch: kernel(1.1), user(0.256), cmd(0x0000937e) autofs4:pid:5584:validate_dev_ioctl: invalid device control module version supplied for cmd(0x0000937e) syz-executor7 (5644): /proc/5637/oom_adj is deprecated, please use /proc/5637/oom_score_adj instead. binder: 5645:5651 unknown command 0 binder: 5645:5651 ioctl c0306201 2000a000 returned -22 sctp: [Deprecated]: syz-executor2 (pid 5651) Use of int in max_burst socket option. Use struct sctp_assoc_value instead binder: BINDER_SET_CONTEXT_MGR already set binder: 5645:5651 ioctl 40046207 0 returned -16 binder: 5645:5651 unknown command 0 binder: 5645:5651 ioctl c0306201 2000a000 returned -22 sctp: [Deprecated]: syz-executor2 (pid 5664) Use of int in max_burst socket option. Use struct sctp_assoc_value instead netlink: 8 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 25 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 25 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor7'. binder: 5901:5904 DecRefs 0 refcount change on invalid ref 0 ret -22 binder: 5904 RLIMIT_NICE not set binder: 5901:5913 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 5901:5913 got transaction to invalid handle binder: 5901:5913 transaction failed 29201/-22, size 32-8 line 2755 binder: 5901:5922 ioctl 40046205 7f returned -22 binder: 5904 RLIMIT_NICE not set binder: 5901:5904 unknown command 2002922117 binder: 5901:5904 ioctl c0306201 204f0000 returned -22 binder: 5901:5913 got transaction to invalid handle binder: 5901:5913 transaction failed 29201/-22, size 0-0 line 2755 binder: 5901:5913 got reply transaction with bad transaction stack, transaction 18 has target 5901:5904 binder: 5901:5913 transaction failed 29201/-71, size 48-8 line 2685 binder: release 5901:5913 transaction 18 out, still active binder: 5901:5922 DecRefs 0 refcount change on invalid ref 0 ret -22 binder: BINDER_SET_CONTEXT_MGR already set binder: 5901:5913 ioctl 40046207 0 returned -16 binder: 5901:5922 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 5901:5922 got transaction to invalid handle binder: 5901:5922 transaction failed 29201/-22, size 32-8 line 2755 binder: 5901:5913 ioctl 40046205 7f returned -22 binder_alloc: 5901: binder_alloc_buf, no vma binder: 5901:5922 transaction failed 29189/-3, size 0-0 line 2870 binder: 5901:5913 BC_FREE_BUFFER u0000000020000000 no match binder: 5901:5913 got transaction to invalid handle binder: 5901:5913 transaction failed 29201/-22, size 0-0 line 2755 binder: 5901:5922 ERROR: BC_REGISTER_LOOPER called without request binder: 5901:5922 got transaction to invalid handle binder: 5901:5922 transaction failed 29201/-22, size 72-16 line 2755 binder: 5901:5922 got reply transaction with no transaction stack binder: 5901:5922 transaction failed 29201/-71, size 48-8 line 2670 netlink: 3 bytes leftover after parsing attributes in process `syz-executor2'. binder: undelivered TRANSACTION_ERROR: 29201 binder: release 5901:5904 transaction 18 in, still active binder: send failed reply for transaction 18, target dead device gre0 entered promiscuous mode SELinux: unrecognized netlink message: protocol=0 nlmsg_type=256 sclass=netlink_route_socket pig=6144 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=256 sclass=netlink_route_socket pig=6173 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=6213 comm=syz-executor4 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=6219 comm=syz-executor4 tmpfs: Bad mount option peUѐ%01D# 0tPe?9(Bڐg8)W