====================================================== WARNING: possible circular locking dependency detected 4.15.0-rc4-next-20171221+ #78 Not tainted ------------------------------------------------------ syz-executor2/18926 is trying to acquire lock: (&sig->cred_guard_mutex){+.+.}, at: [<00000000e4bd8312>] proc_pid_attr_write+0x169/0x280 fs/proc/base.c:2570 but task is already holding lock: (&pipe->mutex/1){+.+.}, at: [<00000000ef229e4f>] pipe_lock_nested fs/pipe.c:67 [inline] (&pipe->mutex/1){+.+.}, at: [<00000000ef229e4f>] pipe_lock+0x56/0x70 fs/pipe.c:75 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&pipe->mutex/1){+.+.}: __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 fs/pipe.c:88 [inline] fifo_open+0x15c/0xa30 fs/pipe.c:916 do_dentry_open+0x667/0xd40 fs/open.c:752 vfs_open+0x107/0x220 fs/open.c:866 do_last fs/namei.c:3397 [inline] path_openat+0x1151/0x3530 fs/namei.c:3537 do_filp_open+0x25b/0x3b0 fs/namei.c:3572 do_open_execat+0x1b9/0x5c0 fs/exec.c:849 do_execveat_common.isra.30+0x90c/0x22a0 fs/exec.c:1736 do_execve fs/exec.c:1843 [inline] SYSC_execve fs/exec.c:1924 [inline] SyS_execve+0x39/0x50 fs/exec.c:1919 do_syscall_64+0x26c/0x920 arch/x86/entry/common.c:285 return_from_SYSCALL_64+0x0/0x75 -> #0 (&sig->cred_guard_mutex){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3914 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16f/0x1a80 kernel/locking/mutex.c:893 mutex_lock_interruptible_nested+0x16/0x20 kernel/locking/mutex.c:930 proc_pid_attr_write+0x169/0x280 fs/proc/base.c:2570 __vfs_write+0xef/0x970 fs/read_write.c:480 __kernel_write+0xf8/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+0x7b7/0x1610 fs/splice.c:1382 entry_SYSCALL_64_fastpath+0x1f/0x96 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&pipe->mutex/1); lock(&sig->cred_guard_mutex); lock(&pipe->mutex/1); lock(&sig->cred_guard_mutex); *** DEADLOCK *** 2 locks held by syz-executor2/18926: #0: (sb_writers#7){.+.+}, at: [<000000006d7f0220>] file_start_write include/linux/fs.h:2719 [inline] #0: (sb_writers#7){.+.+}, at: [<000000006d7f0220>] do_splice fs/splice.c:1146 [inline] #0: (sb_writers#7){.+.+}, at: [<000000006d7f0220>] SYSC_splice fs/splice.c:1402 [inline] #0: (sb_writers#7){.+.+}, at: [<000000006d7f0220>] SyS_splice+0x10f6/0x1610 fs/splice.c:1382 #1: (&pipe->mutex/1){+.+.}, at: [<00000000ef229e4f>] pipe_lock_nested fs/pipe.c:67 [inline] #1: (&pipe->mutex/1){+.+.}, at: [<00000000ef229e4f>] pipe_lock+0x56/0x70 fs/pipe.c:75 stack backtrace: CPU: 0 PID: 18926 Comm: syz-executor2 Not tainted 4.15.0-rc4-next-20171221+ #78 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.isra.37+0x2cd/0x2dc kernel/locking/lockdep.c:1218 check_prev_add kernel/locking/lockdep.c:1858 [inline] check_prevs_add kernel/locking/lockdep.c:1971 [inline] validate_chain kernel/locking/lockdep.c:2412 [inline] __lock_acquire+0x30a8/0x3e00 kernel/locking/lockdep.c:3426 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3914 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16f/0x1a80 kernel/locking/mutex.c:893 mutex_lock_interruptible_nested+0x16/0x20 kernel/locking/mutex.c:930 proc_pid_attr_write+0x169/0x280 fs/proc/base.c:2570 __vfs_write+0xef/0x970 fs/read_write.c:480 __kernel_write+0xf8/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+0x7b7/0x1610 fs/splice.c:1382 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x452ac9 RSP: 002b:00007f9a60ee7c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000452ac9 RDX: 0000000000000015 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 00000000000005bf R08: 00000000000009e9 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f5a88 R13: 00000000ffffffff R14: 00007f9a60ee86d4 R15: 0000000000000000 netlink: 48 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 48 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 48 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 48 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 48 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 48 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 48 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 48 bytes leftover after parsing attributes in process `syz-executor2'. nla_parse: 6 callbacks suppressed netlink: 48 bytes leftover after parsing attributes in process `syz-executor7'. binder: 20306:20309 ioctl 40046205 41 returned -22 binder: 20306:20326 ioctl 40046205 41 returned -22 binder: 22625:22630 transaction failed 29201/-22, size 6802448882990107861--3952382275491249914 line 2960 binder_alloc: binder_alloc_mmap_handler: 22625 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 22625:22643 ioctl 40046207 0 returned -16 binder_alloc: 22625: binder_alloc_buf, no vma binder: 22625:22630 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 binder: 22685:22688 transaction failed 29201/-22, size 6802448882990107861--3952382275491249914 line 2960 binder: 22694:22696 transaction failed 29201/-22, size 6802448882990107861--3952382275491249914 line 2960 binder: 22678:22690 transaction failed 29201/-22, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29201 binder: 22706:22708 transaction failed 29201/-22, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29201 binder: 22710:22713 transaction failed 29201/-22, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29201 binder: 22720:22724 transaction failed 29201/-22, size 6802448882990107861--3952382275491249914 line 2960 binder: 22717:22725 transaction failed 29201/-22, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29201 binder: 22716:22722 transaction failed 29201/-22, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29201 binder_alloc: 22734: binder_alloc_buf, no vma binder: 22734:22737 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 22740: binder_alloc_buf, no vma binder: 22740:22745 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 22747: binder_alloc_buf, no vma binder: 22747:22749 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 binder_alloc: 22756: binder_alloc_buf, no vma binder_alloc: 22753: binder_alloc_buf, no vma binder: 22753:22761 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder: 22760:22765 transaction failed 29201/-22, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29201 binder_alloc: 22770: binder_alloc_buf, no vma binder: 22770:22774 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 22782: binder_alloc_buf, no vma binder: 22782:22785 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder_alloc: 22784: binder_alloc_buf, no vma binder: 22784:22786 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: 22756:22758 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 22796: binder_alloc_buf, no vma binder_alloc: 22795: binder_alloc_buf, no vma binder: 22795:22805 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder_alloc: 22799: binder_alloc_buf, no vma binder: 22799:22802 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 22808: binder_alloc_buf, no vma binder: 22808:22810 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 22811: binder_alloc_buf, no vma binder: 22811:22817 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder: 22796:22798 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 22826: binder_alloc_buf, no vma binder_alloc: 22829: binder_alloc_buf, no vma binder: 22829:22835 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 22825: binder_alloc_buf, no vma binder: 22825:22833 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder_alloc: 22841: binder_alloc_buf, no vma binder: 22841:22843 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 22847: binder_alloc_buf, no vma binder: 22847:22850 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 22853: binder_alloc_buf, no vma binder: 22853:22854 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder: 22826:22834 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 22866: binder_alloc_buf, no vma binder: 22865:22872 transaction failed 29189/-22, size 6802448882990107861--3952382275491249914 line 2845 binder: undelivered TRANSACTION_ERROR: 29189 binder: 22866:22870 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 22887: binder_alloc_buf, no vma binder: 22891:22893 transaction failed 29189/-22, size 6802448882990107861--3952382275491249914 line 2845 binder: undelivered TRANSACTION_ERROR: 29189 binder: 22908:22912 transaction failed 29189/-22, size 6802448882990107861--3952382275491249914 line 2845 binder: undelivered TRANSACTION_ERROR: 29189 binder: 22887:22889 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder_alloc: 22923: binder_alloc_buf, no vma binder: 22923:22928 transaction failed 29189/-3, size 0-0 line 2960 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder_alloc: 22941: binder_alloc_buf, no vma binder: 22940:22945 transaction failed 29189/-22, size 0-0 line 2845 binder: undelivered TRANSACTION_ERROR: 29189 binder: 22941:22943 transaction failed 29189/-3, size 6802448882990107861--3952382275491249914 line 2960 binder: undelivered TRANSACTION_ERROR: 29189