============================= WARNING: suspicious RCU usage 4.15.0-rc9+ #188 Not tainted ----------------------------- ./include/linux/rcupdate.h:302 Illegal context switch in RCU read-side critical section! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 0 3 locks held by syz-executor6/11381: #0: (&mm->mmap_sem){++++}, at: [<0000000053ed701d>] __do_page_fault+0x32d/0xc90 arch/x86/mm/fault.c:1359 #1: (&p->pi_lock){-.-.}, at: [<000000008a3343ec>] try_to_wake_up+0xbc/0x1600 kernel/sched/core.c:1988 #2: (rcu_read_lock){....}, at: [<000000008801eb47>] select_task_rq_fair+0x37a/0x2770 kernel/sched/fair.c:6323 stack backtrace: CPU: 1 PID: 11381 Comm: syz-executor6 Not tainted 4.15.0-rc9+ #188 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 lockdep_rcu_suspicious+0x123/0x170 kernel/locking/lockdep.c:4585 rcu_preempt_sleep_check include/linux/rcupdate.h:301 [inline] ___might_sleep+0x385/0x470 kernel/sched/core.c:6025 clear_huge_page+0xa5/0x730 mm/memory.c:4577 __do_huge_pmd_anonymous_page mm/huge_memory.c:570 [inline] do_huge_pmd_anonymous_page+0x59c/0x1b00 mm/huge_memory.c:728 create_huge_pmd mm/memory.c:3834 [inline] __handle_mm_fault+0x1a0c/0x3ce0 mm/memory.c:4038 handle_mm_fault+0x334/0x8d0 mm/memory.c:4104 __do_page_fault+0x5c9/0xc90 arch/x86/mm/fault.c:1430 do_page_fault+0xee/0x720 arch/x86/mm/fault.c:1505 page_fault+0x4c/0x60 arch/x86/entry/entry_64.S:1260 RIP: 0023:0x804a82b RSP: 002b:000000000844f8e0 EFLAGS: 00010246 RAX: 000000002025c000 RBX: 0000000000000000 RCX: 0000000000000002 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ====================================================== WARNING: possible circular locking dependency detected 4.15.0-rc9+ #188 Not tainted ------------------------------------------------------ syz-executor2/11385 is trying to acquire lock: (&sb->s_type->i_mutex_key#11){++++}, at: [<00000000bd1bf3a1>] inode_lock include/linux/fs.h:713 [inline] (&sb->s_type->i_mutex_key#11){++++}, at: [<00000000bd1bf3a1>] shmem_file_llseek+0xef/0x240 mm/shmem.c:2579 but task is already holding lock: (ashmem_mutex){+.+.}, at: [<00000000641dc869>] ashmem_llseek+0x56/0x1f0 drivers/staging/android/ashmem.c:334 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (ashmem_mutex){+.+.}: __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 ashmem_mmap+0x53/0x410 drivers/staging/android/ashmem.c:370 call_mmap include/linux/fs.h:1777 [inline] mmap_region+0xa99/0x15a0 mm/mmap.c:1705 do_mmap+0x6c0/0xe00 mm/mmap.c:1483 do_mmap_pgoff include/linux/mm.h:2217 [inline] vm_mmap_pgoff+0x1de/0x280 mm/util.c:333 SYSC_mmap_pgoff mm/mmap.c:1533 [inline] SyS_mmap_pgoff+0x462/0x5f0 mm/mmap.c:1491 do_syscall_32_irqs_on arch/x86/entry/common.c:327 [inline] do_fast_syscall_32+0x3ee/0xf9d arch/x86/entry/common.c:389 entry_SYSENTER_compat+0x54/0x63 arch/x86/entry/entry_64_compat.S:129 -> #1 (&mm->mmap_sem){++++}: __might_fault+0x13a/0x1d0 mm/memory.c:4535 _copy_to_user+0x2c/0xc0 lib/usercopy.c:25 copy_to_user include/linux/uaccess.h:155 [inline] filldir+0x1a7/0x320 fs/readdir.c:196 dir_emit_dot include/linux/fs.h:3374 [inline] dir_emit_dots include/linux/fs.h:3385 [inline] dcache_readdir+0x12d/0x5e0 fs/libfs.c:192 iterate_dir+0x1ca/0x530 fs/readdir.c:51 SYSC_getdents fs/readdir.c:231 [inline] SyS_getdents+0x225/0x450 fs/readdir.c:212 entry_SYSCALL_64_fastpath+0x29/0xa0 -> #0 (&sb->s_type->i_mutex_key#11){++++}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3914 down_write+0x87/0x120 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:713 [inline] shmem_file_llseek+0xef/0x240 mm/shmem.c:2579 vfs_llseek+0xa2/0xd0 fs/read_write.c:300 ashmem_llseek+0xe7/0x1f0 drivers/staging/android/ashmem.c:346 vfs_llseek fs/read_write.c:300 [inline] SYSC_lseek fs/read_write.c:313 [inline] SyS_lseek fs/read_write.c:304 [inline] C_SYSC_lseek fs/read_write.c:325 [inline] compat_SyS_lseek+0xeb/0x170 fs/read_write.c:323 do_syscall_32_irqs_on arch/x86/entry/common.c:327 [inline] do_fast_syscall_32+0x3ee/0xf9d arch/x86/entry/common.c:389 entry_SYSENTER_compat+0x54/0x63 arch/x86/entry/entry_64_compat.S:129 other info that might help us debug this: Chain exists of: &sb->s_type->i_mutex_key#11 --> &mm->mmap_sem --> ashmem_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(ashmem_mutex); lock(&mm->mmap_sem); lock(ashmem_mutex); lock(&sb->s_type->i_mutex_key#11); *** DEADLOCK *** 1 lock held by syz-executor2/11385: #0: (ashmem_mutex){+.+.}, at: [<00000000641dc869>] ashmem_llseek+0x56/0x1f0 drivers/staging/android/ashmem.c:334 stack backtrace: CPU: 0 PID: 11385 Comm: syz-executor2 Not tainted 4.15.0-rc9+ #188 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 down_write+0x87/0x120 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:713 [inline] shmem_file_llseek+0xef/0x240 mm/shmem.c:2579 vfs_llseek+0xa2/0xd0 fs/read_write.c:300 ashmem_llseek+0xe7/0x1f0 drivers/staging/android/ashmem.c:346 vfs_llseek fs/read_write.c:300 [inline] SYSC_lseek fs/read_write.c:313 [inline] SyS_lseek fs/read_write.c:304 [inline] C_SYSC_lseek fs/read_write.c:325 [inline] compat_SyS_lseek+0xeb/0x170 fs/read_write.c:323 do_syscall_32_irqs_on arch/x86/entry/common.c:327 [inline] do_fast_syscall_32+0x3ee/0xf9d arch/x86/entry/common.c:389 entry_SYSENTER_compat+0x54/0x63 arch/x86/entry/entry_64_compat.S:129 RIP: 0023:0xf7f84c79 RSP: 002b:00000000f778008c EFLAGS: 00000296 ORIG_RAX: 0000000000000013 RAX: ffffffffffffffda RBX: 0000000000000013 RCX: 0000000000000000 RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 binder: 11473:11483 got reply transaction with bad transaction stack, transaction 26 has target 11473:0 binder: 11473:11483 transaction failed 29201/-71, size 0-0 line 2718 binder_alloc: binder_alloc_mmap_handler: 11473 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 11473:11483 ioctl 40046207 0 returned -16 binder_alloc: 11473: binder_alloc_buf, no vma binder: 11473:11496 transaction failed 29189/-3, size 0-0 line 2903 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 11473:11483 transaction 26 out, still active binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 26, target dead binder: 11584:11586 got reply transaction with no transaction stack binder: 11584:11586 transaction failed 29201/-71, size 0-0 line 2703 binder: 11584:11586 got reply transaction with no transaction stack binder: 11584:11586 transaction failed 29201/-71, size 0-0 line 2703 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29201 device eql entered promiscuous mode audit: type=1400 audit(1516839985.597:837): avc: denied { read } for pid=11660 comm="syz-executor3" path="socket:[31939]" dev="sockfs" ino=31939 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 IPv4: Oversized IP packet from 127.0.0.1 binder: BINDER_SET_CONTEXT_MGR already set binder: 11693:11698 ioctl 40046207 0 returned -16 encrypted_key: insufficient parameters specified encrypted_key: insufficient parameters specified encrypted_key: insufficient parameters specified audit: type=1400 audit(1516839986.255:838): avc: denied { write } for pid=11870 comm="syz-executor3" path="socket:[31368]" dev="sockfs" ino=31368 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_crypto_socket permissive=1 audit: type=1400 audit(1516839986.368:839): avc: denied { read } for pid=11896 comm="syz-executor7" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_crypto_socket permissive=1 audit: type=1326 audit(1516839986.697:840): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=11979 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=40000003 syscall=240 compat=1 ip=0xf7f51c79 code=0x7ffc0000 binder: 12243:12244 got reply transaction with bad transaction stack, transaction 37 has target 12243:0 binder: 12243:12244 transaction failed 29201/-71, size 0-0 line 2718 binder_alloc: binder_alloc_mmap_handler: 12243 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder_alloc: 12243: binder_alloc_buf, no vma binder: 12243:12244 ioctl 40046207 0 returned -16 binder: 12243:12251 transaction failed 29189/-3, size 0-0 line 2903 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 12243:12244 transaction 37 out, still active binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 37, target dead kauditd_printk_skb: 37 callbacks suppressed audit: type=1400 audit(1516839988.180:878): avc: denied { fsetid } for pid=12359 comm="syz-executor2" capability=4 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 netlink: 'syz-executor0': attribute type 3 has an invalid length. netlink: 'syz-executor0': attribute type 3 has an invalid length. netlink: 9 bytes leftover after parsing attributes in process `syz-executor2'. A link change request failed with some changes committed already. Interface lo may have been left with an inconsistent configuration, please check. netlink: 9 bytes leftover after parsing attributes in process `syz-executor2'. A link change request failed with some changes committed already. Interface lo may have been left with an inconsistent configuration, please check. FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 1 PID: 12732 Comm: syz-executor3 Not tainted 4.15.0-rc9+ #188 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:421 [inline] slab_alloc mm/slab.c:3368 [inline] kmem_cache_alloc_trace+0x4b/0x750 mm/slab.c:3608 kmalloc include/linux/slab.h:499 [inline] kzalloc include/linux/slab.h:688 [inline] alloc_pipe_info+0xb1/0x350 fs/pipe.c:628 splice_direct_to_actor+0x64a/0x820 fs/splice.c:920 do_splice_direct+0x29b/0x3c0 fs/splice.c:1061 do_sendfile+0x5c9/0xe80 fs/read_write.c:1413 C_SYSC_sendfile fs/read_write.c:1489 [inline] compat_SyS_sendfile+0xea/0x1a0 fs/read_write.c:1478 do_syscall_32_irqs_on arch/x86/entry/common.c:327 [inline] do_fast_syscall_32+0x3ee/0xf9d arch/x86/entry/common.c:389 entry_SYSENTER_compat+0x54/0x63 arch/x86/entry/entry_64_compat.S:129 RIP: 0023:0xf7f10c79 RSP: 002b:00000000f770c08c EFLAGS: 00000296 ORIG_RAX: 00000000000000bb RAX: ffffffffffffffda RBX: 0000000000000013 RCX: 0000000000000013 RDX: 00000000203c8ff8 RSI: 00000000400000fb RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 audit: type=1400 audit(1516839991.128:879): avc: denied { sys_chroot } for pid=13136 comm="syz-executor0" capability=18 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: 13153:13161 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 13153:13161 unknown command 196 binder: 13153:13161 ioctl c0306201 20016000 returned -22 binder: 13153:13175 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 13153:13175 unknown command 196 binder: 13153:13175 ioctl c0306201 20016000 returned -22 ieee80211 phy4: Selected rate control algorithm 'minstrel_ht' audit: type=1400 audit(1516839991.458:880): avc: denied { bind } for pid=13229 comm="syz-executor7" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 ieee80211 phy5: Selected rate control algorithm 'minstrel_ht' binder: 13258:13264 transaction failed 29189/-22, size 0-0 line 2788 binder: undelivered TRANSACTION_ERROR: 29189 ieee80211 phy6: Selected rate control algorithm 'minstrel_ht' ieee80211 phy7: Selected rate control algorithm 'minstrel_ht' FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 ieee80211 phy8: Selected rate control algorithm 'minstrel_ht' CPU: 0 PID: 13297 Comm: syz-executor6 Not tainted 4.15.0-rc9+ #188 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:421 [inline] slab_alloc mm/slab.c:3368 [inline] kmem_cache_alloc+0x47/0x760 mm/slab.c:3542 create_nsproxy kernel/nsproxy.c:53 [inline] create_new_namespaces+0x88/0x880 kernel/nsproxy.c:71 unshare_nsproxy_namespaces+0xae/0x1e0 kernel/nsproxy.c:206 SYSC_unshare kernel/fork.c:2365 [inline] SyS_unshare+0x653/0xfa0 kernel/fork.c:2315 do_syscall_32_irqs_on arch/x86/entry/common.c:327 [inline] do_fast_syscall_32+0x3ee/0xf9d arch/x86/entry/common.c:389 entry_SYSENTER_compat+0x54/0x63 arch/x86/entry/entry_64_compat.S:129 RIP: 0023:0xf7f37c79 RSP: 002b:00000000f773308c EFLAGS: 00000296 ORIG_RAX: 0000000000000136 RAX: ffffffffffffffda RBX: 0000000008000600 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ieee80211 phy9: Selected rate control algorithm 'minstrel_ht' QAT: Invalid ioctl ieee80211 phy10: Selected rate control algorithm 'minstrel_ht' QAT: Invalid ioctl audit: type=1400 audit(1516839992.152:881): avc: denied { setgid } for pid=13362 comm="syz-executor6" capability=6 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 ieee80211 phy11: Selected rate control algorithm 'minstrel_ht' ieee80211 phy12: Selected rate control algorithm 'minstrel_ht' QAT: Invalid ioctl QAT: Invalid ioctl ieee80211 phy13: Selected rate control algorithm 'minstrel_ht' ieee80211 phy14: Selected rate control algorithm 'minstrel_ht' ieee80211 phy15: Selected rate control algorithm 'minstrel_ht' ieee80211 phy16: Selected rate control algorithm 'minstrel_ht' FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 13638 Comm: syz-executor2 Not tainted 4.15.0-rc9+ #188 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:421 [inline] slab_alloc mm/slab.c:3368 [inline] __do_kmalloc mm/slab.c:3706 [inline] __kmalloc_track_caller+0x5f/0x760 mm/slab.c:3723 __do_krealloc mm/slab_common.c:1407 [inline] krealloc+0x65/0xc0 mm/slab_common.c:1454 netlink_realloc_groups+0x17a/0x280 net/netlink/af_netlink.c:924 netlink_bind+0x784/0xac0 net/netlink/af_netlink.c:974 SYSC_bind+0x1c3/0x410 net/socket.c:1456 SyS_bind+0x24/0x30 net/socket.c:1442 do_syscall_32_irqs_on arch/x86/entry/common.c:327 [inline] do_fast_syscall_32+0x3ee/0xf9d arch/x86/entry/common.c:389 entry_SYSENTER_compat+0x54/0x63 arch/x86/entry/entry_64_compat.S:129 RIP: 0023:0xf7f84c79 RSP: 002b:00000000f778008c EFLAGS: 00000296 ORIG_RAX: 0000000000000169 RAX: ffffffffffffffda RBX: 0000000000000013 RCX: 00000000201e8000 RDX: 000000000000000c RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ieee80211 phy17: Selected rate control algorithm 'minstrel_ht' ieee80211 phy18: Selected rate control algorithm 'minstrel_ht' ieee80211 phy19: Selected rate control algorithm 'minstrel_ht' ieee80211 phy20: Selected rate control algorithm 'minstrel_ht' ieee80211 phy21: Selected rate control algorithm 'minstrel_ht' ieee80211 phy22: Selected rate control algorithm 'minstrel_ht' QAT: Invalid ioctl QAT: Invalid ioctl