binder: 27449:27449 BC_ACQUIRE_DONE u0000000000000002 no match binder: 27449:27449 BC_DEAD_BINDER_DONE 0000000000000000 not found EXT4-fs (loop4): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop4): Couldn't mount because of unsupported optional features (56d80009) ====================================================== [ INFO: possible circular locking dependency detected ] 4.9.205-syzkaller #0 Not tainted ------------------------------------------------------- syz-executor.0/27461 is trying to acquire lock: binder: 27443:27462 ERROR: BC_REGISTER_LOOPER called without request binder: 27443:27462 BC_ACQUIRE_DONE u0000000000000002 no match binder: 27443:27462 BC_DEAD_BINDER_DONE 0000000000000000 not found device lo entered promiscuous mode (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [<000000009cc3cd39>] inode_lock include/linux/fs.h:771 [inline] (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [<000000009cc3cd39>] shmem_fallocate+0x143/0xab0 mm/shmem.c:2683 but task is already holding lock: (ashmem_mutex){+.+.+.}, at: [<0000000040cf786e>] ashmem_shrink_scan+0x56/0x4c0 drivers/staging/android/ashmem.c:455 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3759 __mutex_lock_common kernel/locking/mutex.c:521 [inline] mutex_lock_nested+0xc7/0x920 kernel/locking/mutex.c:621 ashmem_mmap+0x53/0x470 drivers/staging/android/ashmem.c:378 mmap_region+0x7e7/0xfa0 mm/mmap.c:1726 do_mmap+0x539/0xbc0 mm/mmap.c:1505 do_mmap_pgoff include/linux/mm.h:2066 [inline] vm_mmap_pgoff+0x179/0x1c0 mm/util.c:329 SYSC_mmap_pgoff mm/mmap.c:1555 [inline] SyS_mmap_pgoff+0xfa/0x1b0 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+0x1ad/0x5c0 arch/x86/entry/common.c:288 entry_SYSCALL_64_after_swapgs+0x5d/0xdb lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3759 down_read+0x44/0xb0 kernel/locking/rwsem.c:22 __do_page_fault+0x7bd/0xa60 arch/x86/mm/fault.c:1337 do_page_fault+0x28/0x30 arch/x86/mm/fault.c:1464 page_fault+0x25/0x30 arch/x86/entry/entry_64.S:956 generic_perform_write+0x1b6/0x500 mm/filemap.c:2930 __generic_file_write_iter+0x340/0x530 mm/filemap.c:3065 generic_file_write_iter+0x38a/0x630 mm/filemap.c:3093 new_sync_write fs/read_write.c:498 [inline] __vfs_write+0x3c1/0x560 fs/read_write.c:511 vfs_write+0x185/0x520 fs/read_write.c:559 SYSC_write fs/read_write.c:607 [inline] SyS_write+0x121/0x270 fs/read_write.c:599 do_syscall_64+0x1ad/0x5c0 arch/x86/entry/common.c:288 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+0x2d22/0x4390 kernel/locking/lockdep.c:3345 lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3759 down_write+0x41/0xa0 kernel/locking/rwsem.c:52 inode_lock include/linux/fs.h:771 [inline] shmem_fallocate+0x143/0xab0 mm/shmem.c:2683 ashmem_shrink_scan drivers/staging/android/ashmem.c:462 [inline] ashmem_shrink_scan+0x1c3/0x4c0 drivers/staging/android/ashmem.c:446 ashmem_ioctl+0x29b/0xdd0 drivers/staging/android/ashmem.c:804 vfs_ioctl fs/ioctl.c:43 [inline] file_ioctl fs/ioctl.c:493 [inline] do_vfs_ioctl+0xb87/0x11d0 fs/ioctl.c:677 SYSC_ioctl fs/ioctl.c:694 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685 do_syscall_64+0x1ad/0x5c0 arch/x86/entry/common.c:288 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-executor.0/27461: #0: (ashmem_mutex){+.+.+.}, at: [<0000000040cf786e>] ashmem_shrink_scan+0x56/0x4c0 drivers/staging/android/ashmem.c:455 stack backtrace: CPU: 0 PID: 27461 Comm: syz-executor.0 Not tainted 4.9.205-syzkaller #0 ffff8801a97476b8 ffffffff81b55e6b ffffffff83cb8000 ffffffff83cdfc30 ffffffff83cae820 ffffffff8424ff40 ffff8801d01297c0 ffff8801a9747710 ffffffff81406e9a ffff8801a9747708 ffffffff8407ccc0 ffff8801d012a098 Call Trace: [<00000000f2f81f67>] __dump_stack lib/dump_stack.c:15 [inline] [<00000000f2f81f67>] dump_stack+0xcb/0x130 lib/dump_stack.c:56 [<00000000a71af88c>] print_circular_bug.cold+0x2f6/0x454 kernel/locking/lockdep.c:1202 [<0000000058779999>] check_prev_add kernel/locking/lockdep.c:1828 [inline] [<0000000058779999>] check_prevs_add kernel/locking/lockdep.c:1938 [inline] [<0000000058779999>] validate_chain kernel/locking/lockdep.c:2265 [inline] [<0000000058779999>] __lock_acquire+0x2d22/0x4390 kernel/locking/lockdep.c:3345 [<0000000000543c2d>] lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3759 [<0000000099e13632>] down_write+0x41/0xa0 kernel/locking/rwsem.c:52 [<000000009cc3cd39>] inode_lock include/linux/fs.h:771 [inline] [<000000009cc3cd39>] shmem_fallocate+0x143/0xab0 mm/shmem.c:2683 [<000000000f0d5612>] ashmem_shrink_scan drivers/staging/android/ashmem.c:462 [inline] [<000000000f0d5612>] ashmem_shrink_scan+0x1c3/0x4c0 drivers/staging/android/ashmem.c:446 [<0000000007f70d85>] ashmem_ioctl+0x29b/0xdd0 drivers/staging/android/ashmem.c:804 [<00000000d95a53a4>] vfs_ioctl fs/ioctl.c:43 [inline] [<00000000d95a53a4>] file_ioctl fs/ioctl.c:493 [inline] [<00000000d95a53a4>] do_vfs_ioctl+0xb87/0x11d0 fs/ioctl.c:677 [<00000000e2354a7e>] SYSC_ioctl fs/ioctl.c:694 [inline] [<00000000e2354a7e>] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685 [<000000006cda857b>] do_syscall_64+0x1ad/0x5c0 arch/x86/entry/common.c:288 [<000000004e36ee9d>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb device lo left promiscuous mode EXT4-fs (loop4): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop4): Couldn't mount because of unsupported optional features (56d80009) device lo entered promiscuous mode device lo left promiscuous mode EXT4-fs (loop4): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop0): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop0): Couldn't mount because of unsupported optional features (56d80009) EXT4-fs (loop4): Couldn't mount because of unsupported optional features (56d80009) device lo entered promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo left promiscuous mode EXT4-fs (loop4): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop0): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop0): Couldn't mount because of unsupported optional features (56d80009) device lo entered promiscuous mode EXT4-fs (loop4): Couldn't mount because of unsupported optional features (56d80009) device lo entered promiscuous mode device lo left promiscuous mode device lo left promiscuous mode EXT4-fs (loop0): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop0): Couldn't mount because of unsupported optional features (56d80009) device lo entered promiscuous mode EXT4-fs (loop4): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop4): Couldn't mount because of unsupported optional features (56d80009) device lo entered promiscuous mode device lo left promiscuous mode device lo left promiscuous mode EXT4-fs (loop0): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop0): Couldn't mount because of unsupported optional features (56d80009) device lo entered promiscuous mode device lo left promiscuous mode EXT4-fs (loop4): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop0): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop0): Couldn't mount because of unsupported optional features (56d80009) EXT4-fs (loop4): Couldn't mount because of unsupported optional features (56d80009) device lo entered promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo left promiscuous mode EXT4-fs (loop0): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop0): Couldn't mount because of unsupported optional features (56d80009) EXT4-fs (loop4): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop4): Couldn't mount because of unsupported optional features (56d80009) device lo entered promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo left promiscuous mode EXT4-fs (loop4): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop4): Couldn't mount because of unsupported optional features (56d80009) EXT4-fs (loop0): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop0): Couldn't mount because of unsupported optional features (56d80009) device lo entered promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode device lo left promiscuous mode EXT4-fs (loop4): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop4): Couldn't mount because of unsupported optional features (56d80009) device lo entered promiscuous mode EXT4-fs (loop0): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop0): Couldn't mount because of unsupported optional features (56d80009) device lo entered promiscuous mode device lo left promiscuous mode device lo left promiscuous mode EXT4-fs (loop4): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop4): Couldn't mount because of unsupported optional features (56d80009) device lo entered promiscuous mode EXT4-fs (loop0): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop0): Couldn't mount because of unsupported optional features (56d80009) device lo entered promiscuous mode device lo left promiscuous mode device lo left promiscuous mode EXT4-fs (loop4): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop4): Couldn't mount because of unsupported optional features (56d80009) device lo entered promiscuous mode EXT4-fs (loop0): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop0): Couldn't mount because of unsupported optional features (56d80009) device lo entered promiscuous mode device lo left promiscuous mode EXT4-fs (loop4): Quota format mount options ignored when QUOTA feature is enabled device lo left promiscuous mode EXT4-fs (loop4): Couldn't mount because of unsupported optional features (56d80009) device lo entered promiscuous mode EXT4-fs (loop0): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop0): Couldn't mount because of unsupported optional features (56d80009) device lo left promiscuous mode EXT4-fs (loop4): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop4): Couldn't mount because of unsupported optional features (56d80009) EXT4-fs (loop0): Quota format mount options ignored when QUOTA feature is enabled EXT4-fs (loop0): Couldn't mount because of unsupported optional features (56d80009)