====================================================== [ INFO: possible circular locking dependency detected ] 4.4.118-g5f7f76a #24 Not tainted ------------------------------------------------------- syz-executor6/10880 is trying to acquire lock: binder: 10881:10890 BC_DEAD_BINDER_DONE 0000000000000003 not found (&mm->mmap_sem){++++++}, at: [] __might_fault+0xe4/0x1d0 mm/memory.c:3809 binder: 10891:10893 BC_DEAD_BINDER_DONE 0000000000000003 not found but task is already holding lock: (ashmem_mutex){+.+.+.}[ 69.380309] binder: 10895:10896 BC_DEAD_BINDER_DONE 0000000000000003 not found , at: [] ashmem_pin_unpin drivers/staging/android/ashmem.c:701 [inline] , at: [] ashmem_ioctl+0x367/0xfa0 drivers/staging/android/ashmem.c:778 binder: 10897:10898 BC_DEAD_BINDER_DONE 0000000000000003 not found which lock already depends on the new lock. the existing dependency chain (in reverse order) is: : [] lock_acquire+0x15e/0x460 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xbb/0x850 kernel/locking/mutex.c:621 [] ashmem_mmap+0x53/0x400 drivers/staging/android/ashmem.c:366 [] mmap_region+0x94f/0x1250 mm/mmap.c:1664 [] do_mmap+0x4fd/0x9d0 mm/mmap.c:1441 [] do_mmap_pgoff include/linux/mm.h:1915 [inline] [] vm_mmap_pgoff+0x16e/0x1c0 mm/util.c:296 binder: 10905:10908 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 10909:10910 transaction failed 29189/-22, size 0-0 line 3005 binder: 10909:10910 transaction failed 29189/-22, size 0-0 line 3005 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 [] SYSC_mmap_pgoff mm/mmap.c:1491 [inline] [] SyS_mmap_pgoff+0x33f/0x560 mm/mmap.c:1449 [] SYSC_mmap arch/x86/kernel/sys_x86_64.c:95 [inline] [] SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:86 [] entry_SYSCALL_64_fastpath+0x1c/0x98 [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x371f/0x4b50 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x460 kernel/locking/lockdep.c:3592 [] __might_fault+0x14a/0x1d0 mm/memory.c:3810 [] copy_from_user arch/x86/include/asm/uaccess.h:724 [inline] [] ashmem_pin_unpin drivers/staging/android/ashmem.c:706 [inline] [] ashmem_ioctl+0x3b4/0xfa0 drivers/staging/android/ashmem.c:778 [] vfs_ioctl fs/ioctl.c:43 [inline] [] do_vfs_ioctl+0x7aa/0xee0 fs/ioctl.c:607 [] SYSC_ioctl fs/ioctl.c:622 [inline] [] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:613 [] entry_SYSCALL_64_fastpath+0x1c/0x98 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(ashmem_mutex); lock(&mm->mmap_sem); lock(ashmem_mutex); lock(&mm->mmap_sem); *** DEADLOCK *** 1 lock held by syz-executor6/10880: #0: (ashmem_mutex){+.+.+.}, at: [] ashmem_pin_unpin drivers/staging/android/ashmem.c:701 [inline] #0: (ashmem_mutex){+.+.+.}, at: [] ashmem_ioctl+0x367/0xfa0 drivers/staging/android/ashmem.c:778 stack backtrace: CPU: 0 PID: 10880 Comm: syz-executor6 Not tainted 4.4.118-g5f7f76a #24 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 822f6e740ec78586 ffff8801d4db79b8 ffffffff81d0402d ffffffff8519fe60 ffffffff8519fe60 ffffffff851bee80 ffff8801d61db8f8 ffff8801d61db000 ffff8801d4db7a00 ffffffff81233ba1 ffff8801d61db8f8 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_circular_bug+0x271/0x310 kernel/locking/lockdep.c:1226 [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x371f/0x4b50 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x460 kernel/locking/lockdep.c:3592 [] __might_fault+0x14a/0x1d0 mm/memory.c:3810 [] copy_from_user arch/x86/include/asm/uaccess.h:724 [inline] [] ashmem_pin_unpin drivers/staging/android/ashmem.c:706 [inline] [] ashmem_ioctl+0x3b4/0xfa0 drivers/staging/android/ashmem.c:778 [] vfs_ioctl fs/ioctl.c:43 [inline] [] do_vfs_ioctl+0x7aa/0xee0 fs/ioctl.c:607 [] SYSC_ioctl fs/ioctl.c:622 [inline] [] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:613 [] entry_SYSCALL_64_fastpath+0x1c/0x98 binder: 10915:10932 BC_DEAD_BINDER_DONE 0000000000000003 not found TCP: request_sock_TCPv6: Possible SYN flooding on port 20006. Sending cookies. Check SNMP counters. binder: 10940:10960 BC_DEAD_BINDER_DONE 0000000000000003 not found IPVS: set_ctl: invalid protocol: 13703 39.52.93.236:60696 Ɓtpm`x/.HݼބDBC+!o binder: 10976:10994 BC_DEAD_BINDER_DONE 0000000000000003 not found IPVS: set_ctl: invalid protocol: 13703 39.52.93.236:60696 Ɓtpm`x/.HݼބDBC+hn:T binder: 11007:11029 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11052:11068 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11082:11101 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11104:11130 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11152:11155 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11152:11172 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11190:11192 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11190:11213 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11228:11236 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11228:11253 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11336:11343 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 11336:11343 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11336:11354 BC_DEAD_BINDER_DONE 0000000000000003 not found TCP: request_sock_TCPv6: Possible SYN flooding on port 20026. Sending cookies. Check SNMP counters. binder: 11359:11371 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 11359:11371 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11359:11379 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11398:11401 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 11398:11401 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11398:11408 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11411:11420 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 11411:11420 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11411:11451 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11472:11474 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 11472:11474 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11472:11483 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11495:11498 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 11495:11498 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11495:11531 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11556:11560 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 11556:11560 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11556:11573 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11575:11589 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 11575:11589 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11575:11610 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11640:11660 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 11640:11660 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 SELinux: unrecognized netlink message: protocol=6 nlmsg_type=4987 sclass=netlink_xfrm_socket SELinux: unrecognized netlink message: protocol=6 nlmsg_type=4987 sclass=netlink_xfrm_socket binder: 11640:11676 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11691:11698 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 11691:11698 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11691:11698 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11734:11741 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 11734:11741 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11734:11741 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11777:11793 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 11777:11793 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11777:11809 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11839:11844 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 11839:11844 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11839:11852 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11894:11904 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 11894:11904 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11894:11913 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11946:11959 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 11946:11959 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11946:11981 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 11985:11990 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 11985:12018 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12041:12048 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 12059:12061 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 12041:12062 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12059:12061 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 12059:12075 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12088:12101 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 12088:12123 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12134:12135 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 12134:12135 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 12134:12136 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12139:12140 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 12158:12160 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 12139:12140 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12158:12160 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12191:12205 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 12191:12205 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12239:12251 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 12239:12264 BC_DEAD_BINDER_DONE 0000000000000003 not found SELinux: unrecognized netlink message: protocol=6 nlmsg_type=0 sclass=netlink_xfrm_socket binder: 12287:12310 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12330:12351 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12356:12380 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12386:12409 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12429:12451 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12473:12489 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12493:12509 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12526:12536 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12547:12563 BC_DEAD_BINDER_DONE 0000000000000003 not found SELinux: unrecognized netlink message: protocol=6 nlmsg_type=55369 sclass=netlink_xfrm_socket SELinux: unrecognized netlink message: protocol=6 nlmsg_type=55369 sclass=netlink_xfrm_socket binder: 12592:12618 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12637:12662 BC_DEAD_BINDER_DONE 0000000000000003 not found SELinux: unrecognized netlink message: protocol=6 nlmsg_type=54346 sclass=netlink_xfrm_socket SELinux: unrecognized netlink message: protocol=6 nlmsg_type=54346 sclass=netlink_xfrm_socket binder: 12689:12714 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12741:12763 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12783:12806 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12809:12832 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12864:12887 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12898:12915 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12948:12976 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 12999:13006 unknown command 25358 binder: 12999:13006 ioctl c0306201 2000a000 returned -22 binder: 12999:13030 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 13049:13056 unknown command 25358 binder: 13049:13056 ioctl c0306201 2000a000 returned -22 binder: 13049:13073 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 13096:13104 unknown command 25358 binder: 13096:13104 ioctl c0306201 2000a000 returned -22 binder: 13096:13120 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 13149:13151 unknown command 811790 binder: 13149:13151 ioctl c0306201 2000a000 returned -22 binder: 13149:13156 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 13182:13194 unknown command 811790 binder: 13182:13194 ioctl c0306201 2000a000 returned -22 binder: 13182:13206 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 13208:13223 unknown command 811790 binder: 13208:13223 ioctl c0306201 2000a000 returned -22 binder: 13208:13233 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 13256:13261 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 13290:13300 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 13318:13326 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 13337:13345 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 13382:13385 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 13414:13415 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 13645:13652 BC_DEAD_BINDER_DONE 0000000000000000 not found binder: 13670:13671 BC_DEAD_BINDER_DONE 0000000000000000 not found binder: 13682:13688 BC_DEAD_BINDER_DONE 0000000000000000 not found binder: 13708:13715 BC_DEAD_BINDER_DONE 0000000000000000 not found binder: 13708:13715 BC_DEAD_BINDER_DONE 0000000000000000 not found binder: 13712:13725 BC_DEAD_BINDER_DONE 0000000000000000 not found binder: 13738:13755 BC_DEAD_BINDER_DONE 0000000000000000 not found binder: 13771:13790 BC_DEAD_BINDER_DONE 0000000000000000 not found binder: 13775:13795 BC_DEAD_BINDER_DONE 0000000000000000 not found binder: 13811:13831 BC_DEAD_BINDER_DONE 0000000000000000 not found binder: 13845:13867 BC_DEAD_BINDER_DONE 0000000000000000 not found binder: 13885:13902 BC_DEAD_BINDER_DONE 0000000000000000 not found