binder: undelivered TRANSACTION_ERROR: 29201 ====================================================== [ INFO: possible circular locking dependency detected ] 4.9.84-ga9d0273 #44 Not tainted ------------------------------------------------------- syz-executor1/31664 is trying to acquire lock: (&mm->mmap_sem){++++++}, at: [] __might_fault+0xe4/0x1d0 mm/memory.c:3993 but task is already holding lock: (ashmem_mutex){+.+.+.}, at: [] ashmem_pin_unpin drivers/staging/android/ashmem.c:714 [inline] (ashmem_mutex){+.+.+.}, at: [] ashmem_ioctl+0x371/0xfe0 drivers/staging/android/ashmem.c:791 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: lock_acquire+0x12e/0x410 kernel/locking/lockdep.c:3756 __mutex_lock_common kernel/locking/mutex.c:521 [inline] mutex_lock_nested+0xbb/0x870 kernel/locking/mutex.c:621 ashmem_mmap+0x53/0x400 drivers/staging/android/ashmem.c:379 mmap_region+0x7dd/0xfd0 mm/mmap.c:1694 do_mmap+0x57b/0xbe0 mm/mmap.c:1473 do_mmap_pgoff include/linux/mm.h:2019 [inline] vm_mmap_pgoff+0x16b/0x1b0 mm/util.c:329 SYSC_mmap_pgoff mm/mmap.c:1523 [inline] SyS_mmap_pgoff+0x33f/0x560 mm/mmap.c:1481 SYSC_mmap arch/x86/kernel/sys_x86_64.c:95 [inline] SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:86 binder: 31669:31683 got reply transaction with no transaction stack binder: 31669:31683 transaction failed 29201/-71, size 0-0 line 2920 do_syscall_64+0x1a4/0x490 arch/x86/entry/common.c:282 entry_SYSCALL_64_after_swapgs+0x47/0xc5 check_prev_add kernel/locking/lockdep.c:1828 [inline] check_prevs_add kernel/locking/lockdep.c:1938 [inline] validate_chain kernel/locking/lockdep.c:2265 [inline] __lock_acquire+0x2bf9/0x3640 kernel/locking/lockdep.c:3345 lock_acquire+0x12e/0x410 kernel/locking/lockdep.c:3756 __might_fault+0x14a/0x1d0 mm/memory.c:3994 copy_from_user arch/x86/include/asm/uaccess.h:705 [inline] ashmem_pin_unpin drivers/staging/android/ashmem.c:719 [inline] ashmem_ioctl+0x3c0/0xfe0 drivers/staging/android/ashmem.c:791 vfs_ioctl fs/ioctl.c:43 [inline] do_vfs_ioctl+0x1aa/0x1140 fs/ioctl.c:679 SYSC_ioctl fs/ioctl.c:694 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685 do_syscall_64+0x1a4/0x490 arch/x86/entry/common.c:282 entry_SYSCALL_64_after_swapgs+0x47/0xc5 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-executor1/31664: #0: (ashmem_mutex){+.+.+.}, at: [] ashmem_pin_unpin drivers/staging/android/ashmem.c:714 [inline] #0: (ashmem_mutex){+.+.+.}, at: [] ashmem_ioctl+0x371/0xfe0 drivers/staging/android/ashmem.c:791 stack backtrace: CPU: 1 PID: 31664 Comm: syz-executor1 Not tainted 4.9.84-ga9d0273 #44 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801cd257908 ffffffff81d956b9 ffffffff853a2cd0 ffffffff853a2cd0 ffffffff853c32e0 ffff8801cd20d0d8 ffff8801cd20c800 ffff8801cd257950 ffffffff812387f1 ffff8801cd20d0d8[ 343.271973] binder: undelivered TRANSACTION_ERROR: 29201 00000000cd20d0b0 ffff8801cd20d0d8 [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] print_circular_bug+0x271/0x310 kernel/locking/lockdep.c:1202 [] check_prev_add kernel/locking/lockdep.c:1828 [inline] [] check_prevs_add kernel/locking/lockdep.c:1938 [inline] [] validate_chain kernel/locking/lockdep.c:2265 [inline] [] __lock_acquire+0x2bf9/0x3640 kernel/locking/lockdep.c:3345 [] lock_acquire+0x12e/0x410 kernel/locking/lockdep.c:3756 [] __might_fault+0x14a/0x1d0 mm/memory.c:3994 binder: 31701:31709 got reply transaction with no transaction stack binder: 31701:31709 transaction failed 29201/-71, size 0-0 line 2920 [] copy_from_user arch/x86/include/asm/uaccess.h:705 [inline] [] ashmem_pin_unpin drivers/staging/android/ashmem.c:719 [inline] [] ashmem_ioctl+0x3c0/0xfe0 drivers/staging/android/ashmem.c:791 [] vfs_ioctl fs/ioctl.c:43 [inline] [] do_vfs_ioctl+0x1aa/0x1140 fs/ioctl.c:679 binder: BINDER_SET_CONTEXT_MGR already set binder: 31715:31717 ioctl 40046207 0 returned -16 [] SYSC_ioctl fs/ioctl.c:694 [inline] [] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685 [] do_syscall_64+0x1a4/0x490 arch/x86/entry/common.c:282 binder: 31715:31721 got reply transaction with no transaction stack binder: 31715:31721 transaction failed 29201/-71, size 0-0 line 2920 [] entry_SYSCALL_64_after_swapgs+0x47/0xc5 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29201 binder: 31750 RLIMIT_NICE not set binder_alloc: 31736: binder_alloc_buf, no vma binder: 31736:31750 transaction failed 29189/-3, size 0-0 line 3127 binder: send failed reply for transaction 206 to 31736:31745 binder: undelivered TRANSACTION_ERROR: 29190 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: BINDER_SET_CONTEXT_MGR already set binder: 31778:31785 ioctl 40046207 0 returned -16 binder: 31775:31792 got reply transaction with no transaction stack binder: 31775:31792 transaction failed 29201/-71, size 0-0 line 2920 binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 209 to 31775:31781 binder: send failed reply for transaction 211 to 31778:31794 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: 31778:31794 got reply transaction with no transaction stack binder: 31778:31794 transaction failed 29201/-71, size 0-0 line 2920 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 audit_printk_skb: 4650 callbacks suppressed audit: type=1400 audit(1519638373.128:101661): avc: denied { net_admin } for pid=28640 comm="syz-executor3" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519638373.138:101662): avc: denied { net_admin } for pid=3859 comm="syz-executor7" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519638373.148:101663): avc: denied { net_admin } for pid=3859 comm="syz-executor7" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519638373.148:101664): avc: denied { net_admin } for pid=3859 comm="syz-executor7" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519638373.158:101665): avc: denied { net_admin } for pid=3859 comm="syz-executor7" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 binder: 31806:31826 got reply transaction with no transaction stack binder: 31806:31826 transaction failed 29201/-71, size 0-0 line 2920 audit: type=1400 audit(1519638373.168:101666): avc: denied { net_admin } for pid=3859 comm="syz-executor7" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519638373.168:101667): avc: denied { net_admin } for pid=3879 comm="syz-executor6" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519638373.168:101668): avc: denied { net_admin } for pid=3879 comm="syz-executor6" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519638373.188:101669): avc: denied { net_admin } for pid=3859 comm="syz-executor7" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519638373.188:101670): avc: denied { net_admin } for pid=3859 comm="syz-executor7" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 214 to 31806:31820 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: 31841:31849 got reply transaction with no transaction stack binder: 31841:31849 transaction failed 29201/-71, size 0-0 line 2920 binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 217 to 31841:31847 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: 31858:31876 got reply transaction with no transaction stack binder: 31858:31876 transaction failed 29201/-71, size 0-0 line 2920 binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 220 to 31858:31865 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: 31884:31888 transaction failed 29189/-22, size 32-0 line 3004 binder: 31883:31907 got reply transaction with no transaction stack binder: release 31884:31896 transaction 225 out, still active binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: 31883:31907 transaction failed 29201/-71, size 0-0 line 2920 binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 224 to 31883:31890 binder: send failed reply for transaction 225, target dead binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: 31925:31948 got reply transaction with no transaction stack binder: 31925:31948 transaction failed 29201/-71, size 0-0 line 2920 binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 228 to 31925:31933 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: 31982:32006 got reply transaction with no transaction stack binder: 31982:32006 transaction failed 29201/-71, size 0-0 line 2920 binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 231 to 31982:31986 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: 32033 RLIMIT_NICE not set binder: release 32011:32033 transaction 234 in, still active binder: send failed reply for transaction 234 to 32011:32024 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: 32066 RLIMIT_NICE not set binder: release 32055:32066 transaction 236 in, still active binder: send failed reply for transaction 236 to 32055:32059 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: 32093 RLIMIT_NICE not set binder: release 32073:32093 transaction 238 in, still active binder: send failed reply for transaction 238 to 32073:32078 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 audit_printk_skb: 6543 callbacks suppressed audit: type=1400 audit(1519638378.148:103855): avc: denied { net_admin } for pid=321 comm="syz-executor3" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519638378.148:103856): avc: denied { net_admin } for pid=322 comm="syz-executor4" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519638378.188:103857): avc: denied { net_admin } for pid=3860 comm="syz-executor1" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519638378.188:103858): avc: denied { net_admin } for pid=3860 comm="syz-executor1" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519638378.208:103859): avc: denied { net_admin } for pid=5388 comm="syz-executor0" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519638378.258:103860): avc: denied { net_admin } for pid=3879 comm="syz-executor6" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519638378.258:103861): avc: denied { net_admin } for pid=3879 comm="syz-executor6" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519638378.288:103862): avc: denied { net_admin } for pid=3865 comm="syz-executor4" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519638378.288:103863): avc: denied { net_admin } for pid=3865 comm="syz-executor4" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1519638378.428:103864): avc: denied { net_admin } for pid=28640 comm="syz-executor3" capability=12 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 binder: 367:381 got reply transaction with no transaction stack binder: 367:381 transaction failed 29201/-71, size 0-0 line 2920 binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 240 to 367:377 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189