EXT4-fs (loop0): ext4_check_descriptors: Inode bitmap for group 0 overlaps superblock EXT4-fs (loop0): ext4_check_descriptors: Inode table for group 0 overlaps superblock EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue ====================================================== WARNING: possible circular locking dependency detected 4.14.154+ #0 Not tainted ------------------------------------------------------ syz-executor.0/9157 is trying to acquire lock: (&mm->mmap_sem){++++}, at: [<000000007ba7ca84>] __do_page_fault+0x8a4/0xbb0 arch/x86/mm/fault.c:1356 but task is already holding lock: (&sb->s_type->i_mutex_key#10){+.+.}, at: [<0000000041001d15>] inode_lock include/linux/fs.h:724 [inline] (&sb->s_type->i_mutex_key#10){+.+.}, at: [<0000000041001d15>] generic_file_write_iter+0x99/0x650 mm/filemap.c:3283 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&sb->s_type->i_mutex_key#10){+.+.}: down_write+0x34/0x90 kernel/locking/rwsem.c:54 inode_lock include/linux/fs.h:724 [inline] shmem_fallocate+0x150/0xae0 mm/shmem.c:2904 ashmem_shrink_scan drivers/staging/android/ashmem.c:453 [inline] ashmem_shrink_scan+0x1ca/0x4f0 drivers/staging/android/ashmem.c:437 ashmem_ioctl+0x2b4/0xd20 drivers/staging/android/ashmem.c:795 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0xabe/0x1040 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #1 (ashmem_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xf7/0x13e0 kernel/locking/mutex.c:893 ashmem_mmap+0x4c/0x450 drivers/staging/android/ashmem.c:369 call_mmap include/linux/fs.h:1803 [inline] mmap_region+0x7d9/0xfb0 mm/mmap.c:1736 do_mmap+0x548/0xb80 mm/mmap.c:1512 do_mmap_pgoff include/linux/mm.h:2215 [inline] vm_mmap_pgoff+0x177/0x1c0 mm/util.c:333 SYSC_mmap_pgoff mm/mmap.c:1564 [inline] SyS_mmap_pgoff+0xf4/0x1b0 mm/mmap.c:1520 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #0 (&mm->mmap_sem){++++}: lock_acquire+0x12b/0x360 kernel/locking/lockdep.c:3994 down_read+0x37/0xa0 kernel/locking/rwsem.c:24 __do_page_fault+0x8a4/0xbb0 arch/x86/mm/fault.c:1356 page_fault+0x22/0x50 arch/x86/entry/entry_64.S:1122 fault_in_pages_readable include/linux/pagemap.h:606 [inline] iov_iter_fault_in_readable+0x162/0x350 lib/iov_iter.c:421 generic_perform_write+0x158/0x460 mm/filemap.c:3123 __generic_file_write_iter+0x32e/0x550 mm/filemap.c:3258 generic_file_write_iter+0x36f/0x650 mm/filemap.c:3286 call_write_iter include/linux/fs.h:1798 [inline] new_sync_write fs/read_write.c:471 [inline] __vfs_write+0x401/0x5a0 fs/read_write.c:484 vfs_write+0x17f/0x4d0 fs/read_write.c:546 SYSC_pwrite64 fs/read_write.c:636 [inline] SyS_pwrite64+0x136/0x160 fs/read_write.c:623 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 other info that might help us debug this: Chain exists of: &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#10 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sb->s_type->i_mutex_key#10); lock(ashmem_mutex); lock(&sb->s_type->i_mutex_key#10); lock(&mm->mmap_sem); *** DEADLOCK *** 2 locks held by syz-executor.0/9157: #0: (sb_writers#6){.+.+}, at: [<0000000033779b44>] file_start_write include/linux/fs.h:2746 [inline] #0: (sb_writers#6){.+.+}, at: [<0000000033779b44>] vfs_write+0x3d8/0x4d0 fs/read_write.c:545 #1: (&sb->s_type->i_mutex_key#10){+.+.}, at: [<0000000041001d15>] inode_lock include/linux/fs.h:724 [inline] #1: (&sb->s_type->i_mutex_key#10){+.+.}, at: [<0000000041001d15>] generic_file_write_iter+0x99/0x650 mm/filemap.c:3283 stack backtrace: CPU: 1 PID: 9157 Comm: syz-executor.0 Not tainted 4.14.154+ #0 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xe5/0x154 lib/dump_stack.c:58 print_circular_bug.isra.0.cold+0x2dc/0x425 kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1901 [inline] check_prevs_add kernel/locking/lockdep.c:2018 [inline] validate_chain kernel/locking/lockdep.c:2460 [inline] __lock_acquire+0x2f5f/0x4320 kernel/locking/lockdep.c:3487 lock_acquire+0x12b/0x360 kernel/locking/lockdep.c:3994 down_read+0x37/0xa0 kernel/locking/rwsem.c:24 __do_page_fault+0x8a4/0xbb0 arch/x86/mm/fault.c:1356 page_fault+0x22/0x50 arch/x86/entry/entry_64.S:1122 RIP: 0010:fault_in_pages_readable include/linux/pagemap.h:606 [inline] RIP: 0010:iov_iter_fault_in_readable+0x162/0x350 lib/iov_iter.c:421 RSP: 0018:ffff8881c890fa90 EFLAGS: 00010246 RAX: 0000000000040000 RBX: 0000000000000000 RCX: 0000000000017d54 RDX: ffffffff81bad33c RSI: ffffc90005147000 RDI: ffff8881c890fd20 RBP: 1ffff11039121f53 R08: 0000000000000001 R09: 0000000000000000 R10: ffff8881c80d1fd8 R11: 0000000000000000 R12: 000000000000001c R13: 0000000000000000 R14: 000000000000001b R15: ffff8881c890fd18 generic_perform_write+0x158/0x460 mm/filemap.c:3123 __generic_file_write_iter+0x32e/0x550 mm/filemap.c:3258 generic_file_write_iter+0x36f/0x650 mm/filemap.c:3286 call_write_iter include/linux/fs.h:1798 [inline] new_sync_write fs/read_write.c:471 [inline] __vfs_write+0x401/0x5a0 fs/read_write.c:484 vfs_write+0x17f/0x4d0 fs/read_write.c:546 SYSC_pwrite64 fs/read_write.c:636 [inline] SyS_pwrite64+0x136/0x160 fs/read_write.c:623 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x414437 RSP: 002b:00007f8a2b7c4a80 EFLAGS: 00000293 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffda RBX: 0000000020000248 RCX: 0000000000414437 RDX: 000000000000001c RSI: 0000000000000000 RDI: 0000000000000003 RBP: 000000000000000d R08: fe03f80fe03f80ff R09: 0000000000000000 R10: 0000000000200000 R11: 0000000000000293 R12: 0000000000000003 R13: 00000000004c9eb9 R14: 00000000004e1bc8 R15: 00000000ffffffff kauditd_printk_skb: 204 callbacks suppressed audit: type=1400 audit(2000000345.327:20382): avc: denied { map } for pid=9187 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000345.327:20383): avc: denied { map } for pid=9187 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000345.347:20384): avc: denied { map } for pid=9192 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000345.347:20385): avc: denied { map } for pid=9187 comm="blkid" path="/lib/x86_64-linux-gnu/ld-2.13.so" dev="sda1" ino=2668 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000345.357:20386): avc: denied { map } for pid=9183 comm="blkid" path="/lib/x86_64-linux-gnu/libuuid.so.1.3.0" dev="sda1" ino=2819 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000345.357:20387): avc: denied { map } for pid=9183 comm="blkid" path="/lib/x86_64-linux-gnu/libuuid.so.1.3.0" dev="sda1" ino=2819 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000345.377:20388): avc: denied { map } for pid=9192 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000345.377:20389): avc: denied { map } for pid=9187 comm="blkid" path="/lib/x86_64-linux-gnu/ld-2.13.so" dev="sda1" ino=2668 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: audit_backlog=65 > audit_backlog_limit=64 audit: audit_lost=12 audit_rate_limit=0 audit_backlog_limit=64 ip6_tunnel:  xmit: Local address not yet configured! kauditd_printk_skb: 177 callbacks suppressed audit: type=1400 audit(2000000350.487:20566): avc: denied { map } for pid=9296 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000350.517:20567): avc: denied { map } for pid=9296 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000350.527:20568): avc: denied { map } for pid=9296 comm="blkid" path="/lib/x86_64-linux-gnu/ld-2.13.so" dev="sda1" ino=2668 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000350.537:20569): avc: denied { map } for pid=9296 comm="blkid" path="/lib/x86_64-linux-gnu/ld-2.13.so" dev="sda1" ino=2668 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000350.567:20570): avc: denied { map } for pid=9296 comm="blkid" path="/etc/ld.so.cache" dev="sda1" ino=2503 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000350.577:20571): avc: denied { map } for pid=9296 comm="blkid" path="/lib/x86_64-linux-gnu/libblkid.so.1.1.0" dev="sda1" ino=2825 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000350.577:20572): avc: denied { map } for pid=9296 comm="blkid" path="/lib/x86_64-linux-gnu/libblkid.so.1.1.0" dev="sda1" ino=2825 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000350.637:20573): avc: denied { map } for pid=9296 comm="blkid" path="/lib/x86_64-linux-gnu/libc-2.13.so" dev="sda1" ino=2784 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000350.647:20574): avc: denied { map } for pid=9296 comm="blkid" path="/lib/x86_64-linux-gnu/libc-2.13.so" dev="sda1" ino=2784 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000350.697:20575): avc: denied { map } for pid=9296 comm="blkid" path="/lib/x86_64-linux-gnu/libuuid.so.1.3.0" dev="sda1" ino=2819 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1