====================================================== WARNING: possible circular locking dependency detected 4.14.0+ #176 Not tainted ------------------------------------------------------ syz-executor2/15415 is trying to acquire lock: (console_lock){+.+.}, at: [] vcs_write+0x14d/0xca0 drivers/tty/vt/vc_screen.c:397 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:4007 __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] shmem_free_inode+0x75/0xc0 mm/shmem.c:260 -> #1 ((completion)&req.done){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4007 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:795 con_install+0x52/0x440 drivers/tty/vt/vt.c:2876 tty_driver_install_tty drivers/tty/tty_io.c:1214 [inline] tty_init_dev+0xf6/0x4a0 drivers/tty/tty_io.c:1314 tty_open_by_driver drivers/tty/tty_io.c:1941 [inline] tty_open+0x608/0xab0 drivers/tty/tty_io.c:1989 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:2032 [inline] validate_chain kernel/locking/lockdep.c:2474 [inline] __lock_acquire+0x33ad/0x4840 kernel/locking/lockdep.c:3503 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4007 console_lock+0x4b/0x80 kernel/printk/printk.c:2047 vcs_write+0x14d/0xca0 drivers/tty/vt/vc_screen.c:397 __vfs_write+0xef/0x970 fs/read_write.c:480 __kernel_write+0xfe/0x350 fs/read_write.c:501 write_pipe_buf+0x175/0x220 fs/splice.c:797 splice_from_pipe_feed fs/splice.c:502 [inline] __splice_from_pipe+0x328/0x730 fs/splice.c:626 splice_from_pipe+0x1e9/0x330 fs/splice.c:661 default_file_splice_write+0x40/0x90 fs/splice.c:809 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: 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-executor2/15415: #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: 15415 Comm: syz-executor2 Not tainted 4.14.0+ #176 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:1272 check_prev_add+0x8b1/0x1580 kernel/locking/lockdep.c:1915 check_prevs_add kernel/locking/lockdep.c:2032 [inline] validate_chain kernel/locking/lockdep.c:2474 [inline] __lock_acquire+0x33ad/0x4840 kernel/locking/lockdep.c:3503 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4007 console_lock+0x4b/0x80 kernel/printk/printk.c:2047 vcs_write+0x14d/0xca0 drivers/tty/vt/vc_screen.c:397 __vfs_write+0xef/0x970 fs/read_write.c:480 __kernel_write+0xfe/0x350 fs/read_write.c:501 write_pipe_buf+0x175/0x220 fs/splice.c:797 splice_from_pipe_feed fs/splice.c:502 [inline] __splice_from_pipe+0x328/0x730 fs/splice.c:626 splice_from_pipe+0x1e9/0x330 fs/splice.c:661 default_file_splice_write+0x40/0x90 fs/splice.c:809 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:0x452879 RSP: 002b:00007f4292058be8 EFLAGS: 00000212 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 0000000000758020 RCX: 0000000000452879 RDX: 0000000000000013 RSI: 0000000000000000 RDI: 0000000000000014 RBP: 0000000000000082 R08: 00000000fffff5fc R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 0000000000000000 R13: 0000000000a6f7ff R14: 00007f42920599c0 R15: 0000000000000000 sctp: [Deprecated]: syz-executor0 (pid 15458) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor0 (pid 15461) Use of int in maxseg socket option. Use struct sctp_assoc_value instead dccp_invalid_packet: P.Data Offset(116) too large QAT: Invalid ioctl QAT: Invalid ioctl SELinux: unrecognized netlink message: protocol=0 nlmsg_type=3 sclass=netlink_route_socket pig=15727 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=15727 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=51 sclass=netlink_route_socket pig=15747 comm=syz-executor7 rfkill: input handler disabled SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=15727 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=15747 comm=syz-executor7 rfkill: input handler enabled SELinux: unrecognized netlink message: protocol=0 nlmsg_type=3 sclass=netlink_route_socket pig=15747 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=15727 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=51 sclass=netlink_route_socket pig=15727 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=15747 comm=syz-executor7 QAT: Invalid ioctl QAT: Invalid ioctl device gre0 entered promiscuous mode device gre0 entered promiscuous mode device gre0 entered promiscuous mode device gre0 entered promiscuous mode device gre0 entered promiscuous mode FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 0 PID: 16494 Comm: syz-executor0 Not tainted 4.14.0+ #176 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 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_failslab+0xec/0x120 mm/failslab.c:32 slab_pre_alloc_hook mm/slab.h:423 [inline] slab_alloc mm/slab.c:3384 [inline] __do_kmalloc mm/slab.c:3724 [inline] __kmalloc_track_caller+0x5f/0x760 mm/slab.c:3741 memdup_user+0x2c/0x90 mm/util.c:164 map_update_elem kernel/bpf/syscall.c:543 [inline] SYSC_bpf kernel/bpf/syscall.c:1478 [inline] SyS_bpf+0x1db6/0x46a0 kernel/bpf/syscall.c:1453 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x452879 RSP: 002b:00007f9bed06dbe8 EFLAGS: 00000212 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 0000000000758020 RCX: 0000000000452879 RDX: 0000000000000020 RSI: 0000000020eeb000 RDI: 0000000000000002 RBP: 00007f9bed06da20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b757e R13: 00007f9bed06db58 R14: 00000000004b758e R15: 0000000000000000 QAT: Invalid ioctl QAT: Invalid ioctl device gre0 entered promiscuous mode FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 16697 Comm: syz-executor5 Not tainted 4.14.0+ #176 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 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_failslab+0xec/0x120 mm/failslab.c:32 slab_pre_alloc_hook mm/slab.h:423 [inline] slab_alloc mm/slab.c:3384 [inline] __do_kmalloc mm/slab.c:3724 [inline] __kmalloc_track_caller+0x5f/0x760 mm/slab.c:3741 memdup_user+0x2c/0x90 mm/util.c:164 map_update_elem kernel/bpf/syscall.c:543 [inline] SYSC_bpf kernel/bpf/syscall.c:1478 [inline] SyS_bpf+0x1db6/0x46a0 kernel/bpf/syscall.c:1453 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x452879 RSP: 002b:00007f5a89d12be8 EFLAGS: 00000212 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 0000000000758020 RCX: 0000000000452879 RDX: 0000000000000020 RSI: 0000000020eeb000 RDI: 0000000000000002 RBP: 00007f5a89d12a20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b757e R13: 00007f5a89d12b58 R14: 00000000004b758e R15: 0000000000000000 device gre0 entered promiscuous mode device gre0 entered promiscuous mode device gre0 entered promiscuous mode device gre0 entered promiscuous mode FAULT_INJECTION: forcing a failure. name fail_page_alloc, interval 1, probability 0, space 0, times 1 CPU: 1 PID: 16977 Comm: syz-executor2 Not tainted 4.14.0+ #176 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 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_fail_alloc_page mm/page_alloc.c:2897 [inline] prepare_alloc_pages mm/page_alloc.c:4152 [inline] __alloc_pages_nodemask+0x338/0xd80 mm/page_alloc.c:4191 alloc_pages_current+0xb6/0x1e0 mm/mempolicy.c:2038 alloc_pages include/linux/gfp.h:506 [inline] skb_page_frag_refill+0x358/0x5f0 net/core/sock.c:2203 tun_build_skb.isra.42+0x2e8/0x1710 drivers/net/tun.c:1290 tun_get_user+0x1e0f/0x21d0 drivers/net/tun.c:1456 tun_chr_write_iter+0xde/0x190 drivers/net/tun.c:1582 call_write_iter include/linux/fs.h:1771 [inline] do_iter_readv_writev+0x531/0x7f0 fs/read_write.c:674 do_iter_write+0x15a/0x540 fs/read_write.c:953 vfs_writev+0x18a/0x340 fs/read_write.c:998 do_writev+0xfc/0x2a0 fs/read_write.c:1033 SYSC_writev fs/read_write.c:1106 [inline] SyS_writev+0x27/0x30 fs/read_write.c:1103 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x452751 RSP: 002b:00007f4292058b10 EFLAGS: 00000293 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 00000000000000d6 RCX: 0000000000452751 RDX: 0000000000000001 RSI: 00007f4292058b60 RDI: 0000000000000012 RBP: 00007f4292058a20 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000000d6 R11: 0000000000000293 R12: 00000000004b757e R13: 00007f4292058b58 R14: 00000000004b758e R15: 0000000000000000 FAULT_INJECTION: forcing a failure. name fail_page_alloc, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 16996 Comm: syz-executor6 Not tainted 4.14.0+ #176 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 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_fail_alloc_page mm/page_alloc.c:2897 [inline] prepare_alloc_pages mm/page_alloc.c:4152 [inline] __alloc_pages_nodemask+0x338/0xd80 mm/page_alloc.c:4191 alloc_pages_current+0xb6/0x1e0 mm/mempolicy.c:2038 alloc_pages include/linux/gfp.h:506 [inline] skb_page_frag_refill+0x358/0x5f0 net/core/sock.c:2203 tun_build_skb.isra.42+0x2e8/0x1710 drivers/net/tun.c:1290 tun_get_user+0x1e0f/0x21d0 drivers/net/tun.c:1456 tun_chr_write_iter+0xde/0x190 drivers/net/tun.c:1582 call_write_iter include/linux/fs.h:1771 [inline] do_iter_readv_writev+0x531/0x7f0 fs/read_write.c:674 do_iter_write+0x15a/0x540 fs/read_write.c:953 vfs_writev+0x18a/0x340 fs/read_write.c:998 do_writev+0xfc/0x2a0 fs/read_write.c:1033 SYSC_writev fs/read_write.c:1106 [inline] SyS_writev+0x27/0x30 fs/read_write.c:1103 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x452751 RSP: 002b:00007f0c37d2db10 EFLAGS: 00000293 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 00000000000000d6 RCX: 0000000000452751 RDX: 0000000000000001 RSI: 00007f0c37d2db60 RDI: 0000000000000012 RBP: 00007f0c37d2da20 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000000d6 R11: 0000000000000293 R12: 00000000004b757e R13: 00007f0c37d2db58 R14: 00000000004b758e R15: 0000000000000000 device gre0 entered promiscuous mode device gre0 entered promiscuous mode device gre0 entered promiscuous mode QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl selinux_nlmsg_perm: 31 callbacks suppressed SELinux: unrecognized netlink message: protocol=0 nlmsg_type=3 sclass=netlink_route_socket pig=17350 comm=syz-executor2 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=17350 comm=syz-executor2 device gre0 entered promiscuous mode SELinux: unrecognized netlink message: protocol=0 nlmsg_type=3 sclass=netlink_route_socket pig=17350 comm=syz-executor2 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=17350 comm=syz-executor2 device gre0 entered promiscuous mode device gre0 entered promiscuous mode device gre0 entered promiscuous mode device gre0 entered promiscuous mode QAT: Invalid ioctl QAT: Invalid ioctl device gre0 entered promiscuous mode SELinux: unrecognized netlink message: protocol=9 nlmsg_type=16 sclass=netlink_audit_socket pig=17716 comm=syz-executor5 device gre0 entered promiscuous mode netlink: 10 bytes leftover after parsing attributes in process `syz-executor5'. SELinux: unrecognized netlink message: protocol=9 nlmsg_type=0 sclass=netlink_audit_socket pig=17716 comm=syz-executor5 device gre0 entered promiscuous mode device gre0 entered promiscuous mode device gre0 entered promiscuous mode QAT: Invalid ioctl QAT: Invalid ioctl device gre0 entered promiscuous mode device gre0 entered promiscuous mode