urandom_read: 1 callbacks suppressed random: sshd: uninitialized urandom read (32 bytes read) ====================================================== [ INFO: possible circular locking dependency detected ] 4.9.119-g9dc978d #23 Not tainted ------------------------------------------------------- syz-executor052/3784 is trying to acquire lock: (&sb->s_type->i_mutex_key#10){++++++}, at: [] inode_lock include/linux/fs.h:766 [inline] (&sb->s_type->i_mutex_key#10){++++++}, at: [] shmem_fallocate+0x13c/0xb40 mm/shmem.c:2674 but task is already holding lock: (ashmem_mutex){+.+.+.}, at: [] ashmem_shrink_scan+0x55/0x3a0 drivers/staging/android/ashmem.c:449 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756 __mutex_lock_common kernel/locking/mutex.c:521 [inline] mutex_lock_nested+0xc0/0x870 kernel/locking/mutex.c:621 ashmem_mmap+0x53/0x3f0 drivers/staging/android/ashmem.c:378 mmap_region+0x893/0x1040 mm/mmap.c:1726 do_mmap+0x59c/0xcc0 mm/mmap.c:1505 do_mmap_pgoff include/linux/mm.h:2032 [inline] vm_mmap_pgoff+0x168/0x1b0 mm/util.c:329 SYSC_mmap_pgoff mm/mmap.c:1555 [inline] SyS_mmap_pgoff+0x342/0x550 mm/mmap.c:1513 SYSC_mmap arch/x86/kernel/sys_x86_64.c:96 [inline] SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:87 do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282 entry_SYSCALL_64_after_swapgs+0x5d/0xdb lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756 __might_fault+0x14a/0x1d0 mm/memory.c:4014 copy_to_user arch/x86/include/asm/uaccess.h:727 [inline] filldir+0x1a4/0x370 fs/readdir.c:195 dir_emit_dot include/linux/fs.h:3241 [inline] dir_emit_dots include/linux/fs.h:3252 [inline] dcache_readdir+0x130/0x5d0 fs/libfs.c:191 iterate_dir+0x1ac/0x600 fs/readdir.c:50 SYSC_getdents fs/readdir.c:230 [inline] SyS_getdents+0x13c/0x2a0 fs/readdir.c:211 do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282 entry_SYSCALL_64_after_swapgs+0x5d/0xdb 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+0x3019/0x4070 kernel/locking/lockdep.c:3345 lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756 down_write+0x41/0xa0 kernel/locking/rwsem.c:52 inode_lock include/linux/fs.h:766 [inline] shmem_fallocate+0x13c/0xb40 mm/shmem.c:2674 ashmem_shrink_scan+0x1bd/0x3a0 drivers/staging/android/ashmem.c:456 ashmem_ioctl+0x2c1/0xf20 drivers/staging/android/ashmem.c:798 vfs_ioctl fs/ioctl.c:43 [inline] file_ioctl fs/ioctl.c:493 [inline] do_vfs_ioctl+0x1ac/0x11a0 fs/ioctl.c:677 SYSC_ioctl fs/ioctl.c:694 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685 do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282 entry_SYSCALL_64_after_swapgs+0x5d/0xdb other info that might help us debug this: Chain exists of: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(ashmem_mutex); lock(&mm->mmap_sem); lock(ashmem_mutex); lock(&sb->s_type->i_mutex_key#10); *** DEADLOCK *** 1 lock held by syz-executor052/3784: #0: (ashmem_mutex){+.+.+.}, at: [] ashmem_shrink_scan+0x55/0x3a0 drivers/staging/android/ashmem.c:449 stack backtrace: CPU: 0 PID: 3784 Comm: syz-executor052 Not tainted 4.9.119-g9dc978d #23 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801ba607638 ffffffff81eb4be9 ffffffff855d09d0 ffffffff855eeac0 ffffffff855d7e40 ffff8801bb19d0e8 ffff8801bb19c800 ffff8801ba607680 ffffffff81426644 0000000000000001 00000000bb19c800 0000000000000001 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] print_circular_bug.cold.51+0x1bd/0x27d 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+0x3019/0x4070 kernel/locking/lockdep.c:3345 [] lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756 [] down_write+0x41/0xa0 kernel/locking/rwsem.c:52 [] inode_lock include/linux/fs.h:766 [inline] [] shmem_fallocate+0x13c/0xb40 mm/shmem.c:2674 [] ashmem_shrink_scan+0x1bd/0x3a0 drivers/staging/android/ashmem.c:456 [] ashmem_ioctl+0x2c1/0xf20 drivers/staging/android/ashmem.c:798 [] vfs_ioctl fs/ioctl.c:43 [inline] [] file_ioctl fs/ioctl.c:493 [inline] [] do_vfs_ioctl+0x1ac/0x11a0 fs/ioctl.c:677 [] SYSC_ioctl fs/ioctl.c:694 [inline] [] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685 [] do_syscall_64+0x1a6/