====================================================== [ INFO: possible circular locking dependency detected ] 4.9.202+ #0 Not tainted ------------------------------------------------------- syz-executor.2/13311 is trying to acquire lock: (&mm->mmap_sem){++++++}, at: [<00000000137a7c58>] __do_page_fault+0x7bd/0xa60 arch/x86/mm/fault.c:1337 but task is already holding lock: (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [<000000001e519371>] inode_lock include/linux/fs.h:771 [inline] (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [<000000001e519371>] generic_file_write_iter+0x9a/0x630 mm/filemap.c:3090 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 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 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 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_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_pwrite64 fs/read_write.c:649 [inline] SyS_pwrite64+0x13f/0x170 fs/read_write.c:636 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(&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.2/13311: #0: (sb_writers#6){.+.+.+}, at: [<000000009a32555e>] file_start_write include/linux/fs.h:2645 [inline] #0: (sb_writers#6){.+.+.+}, at: [<000000009a32555e>] vfs_write+0x3e9/0x520 fs/read_write.c:558 #1: (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [<000000001e519371>] inode_lock include/linux/fs.h:771 [inline] #1: (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [<000000001e519371>] generic_file_write_iter+0x9a/0x630 mm/filemap.c:3090 stack backtrace: CPU: 1 PID: 13311 Comm: syz-executor.2 Not tainted 4.9.202+ #0 ffff8801d6a575e8 ffffffff81b55d2b ffffffff83caeb80 ffffffff83cb7e50 ffffffff83cfc070 ffffffff8424ff40 ffff8801a47adf00 ffff8801d6a57640 ffffffff81406d6a ffffffff82e2e270 ffffffff840865c0 ffff8801a47ae800 Call Trace: [<000000007c14d7d4>] __dump_stack lib/dump_stack.c:15 [inline] [<000000007c14d7d4>] dump_stack+0xcb/0x130 lib/dump_stack.c:56 [<000000005e1f63e0>] print_circular_bug.cold+0x2f6/0x454 kernel/locking/lockdep.c:1202 [<000000006a1f01e3>] check_prev_add kernel/locking/lockdep.c:1828 [inline] [<000000006a1f01e3>] check_prevs_add kernel/locking/lockdep.c:1938 [inline] [<000000006a1f01e3>] validate_chain kernel/locking/lockdep.c:2265 [inline] [<000000006a1f01e3>] __lock_acquire+0x2d22/0x4390 kernel/locking/lockdep.c:3345 [<00000000f6750e9d>] lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3759 [<000000006569a8fa>] down_read+0x44/0xb0 kernel/locking/rwsem.c:22 [<00000000137a7c58>] __do_page_fault+0x7bd/0xa60 arch/x86/mm/fault.c:1337 [<000000009d9f3803>] do_page_fault+0x28/0x30 arch/x86/mm/fault.c:1464 [<00000000e3861608>] page_fault+0x25/0x30 arch/x86/entry/entry_64.S:956 [<00000000a34b0e54>] generic_perform_write+0x1b6/0x500 mm/filemap.c:2930 [<00000000ef6f4300>] __generic_file_write_iter+0x340/0x530 mm/filemap.c:3065 [<00000000b371a6be>] generic_file_write_iter+0x38a/0x630 mm/filemap.c:3093 [<00000000ec036545>] new_sync_write fs/read_write.c:498 [inline] [<00000000ec036545>] __vfs_write+0x3c1/0x560 fs/read_write.c:511 [<00000000bf754a06>] vfs_write+0x185/0x520 fs/read_write.c:559 [<000000005ef7e059>] SYSC_pwrite64 fs/read_write.c:649 [inline] [<000000005ef7e059>] SyS_pwrite64+0x13f/0x170 fs/read_write.c:636 [<00000000d61d6fd0>] do_syscall_64+0x1ad/0x5c0 arch/x86/entry/common.c:288 [<0000000071edc80b>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb netlink: 8 bytes leftover after parsing attributes in process `syz-executor.0'. selinux_nlmsg_perm: 101 callbacks suppressed SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=13410 comm=syz-executor.0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=13410 comm=syz-executor.0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=13410 comm=syz-executor.0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=13410 comm=syz-executor.0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=13410 comm=syz-executor.0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=13410 comm=syz-executor.0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=13410 comm=syz-executor.0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=13410 comm=syz-executor.0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=13410 comm=syz-executor.0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=13410 comm=syz-executor.0 out of order segment: rcv_next E0F47829 seq E0F47B39 - E0F47B99 out of order segment: rcv_next E0F47829 seq E0F47B99 - E0F47BF9 ofo requeuing : rcv_next E0F4791D seq E0F4791D - E0F479E5 partial packet: rcv_next E0F479E5 seq E0F479E1 - E0F47A91 ofo requeuing : rcv_next E0F47B39 seq E0F47B39 - E0F47B99 ofo requeuing : rcv_next E0F47B99 seq E0F47B99 - E0F47BF9 out of order segment: rcv_next E0F47CB5 seq E0F47CB9 - E0F47D75 out of order segment: rcv_next E0F47CB5 seq E0F47D79 - E0F47DD9 out of order segment: rcv_next E0F47CB5 seq E0F47DD9 - E0F47E89 out of order segment: rcv_next E0F47CB5 seq E0F47E89 - E0F47F39 out of order segment: rcv_next E0F47CB5 seq E0F47F39 - E0F47F91 out of order segment: rcv_next E0F47CB5 seq E0F47F91 - E0F47FE9 out of order segment: rcv_next E0F47CB5 seq E0F47FE9 - E0F48099 out of order segment: rcv_next E0F47CB5 seq E0F48099 - E0F480F1 out of order segment: rcv_next E0F47CB5 seq E0F480F1 - E0F48149 out of order segment: rcv_next E0F47CB5 seq E0F48149 - E0F481F9 out of order segment: rcv_next E0F47CB5 seq E0F481F9 - E0F48251 out of order segment: rcv_next E0F47CB5 seq E0F48251 - E0F482A9 out of order segment: rcv_next E0F47CB5 seq E0F482A9 - E0F48359 out of order segment: rcv_next E0F47CB5 seq E0F48359 - E0F483B1 out of order segment: rcv_next E0F47CB5 seq E0F483B1 - E0F48409 out of order segment: rcv_next E0F47CB5 seq E0F48409 - E0F484B9 out of order segment: rcv_next E0F47CB5 seq E0F484B9 - E0F48511 out of order segment: rcv_next E0F47CB5 seq E0F48511 - E0F48569 out of order segment: rcv_next E0F47CB5 seq E0F48569 - E0F48619 out of order segment: rcv_next E0F47CB5 seq E0F48619 - E0F48671 out of order segment: rcv_next E0F47CB5 seq E0F48671 - E0F486C9 out of order segment: rcv_next E0F47CB5 seq E0F486C9 - E0F48779 out of order segment: rcv_next E0F47CB5 seq E0F48779 - E0F487D1 out of order segment: rcv_next E0F47CB5 seq E0F487D1 - E0F48829 out of order segment: rcv_next E0F47CB5 seq E0F48829 - E0F488D9 out of order segment: rcv_next E0F47CB5 seq E0F488D9 - E0F48931 out of order segment: rcv_next E0F47CB5 seq E0F48931 - E0F48989 out of order segment: rcv_next E0F47CB5 seq E0F48989 - E0F48A39 out of order segment: rcv_next E0F47CB5 seq E0F48A39 - E0F48A91 out of order segment: rcv_next E0F47CB5 seq E0F48A91 - E0F48AE9 out of order segment: rcv_next E0F47CB5 seq E0F48AE9 - E0F48B99 out of order segment: rcv_next E0F47CB5 seq E0F48B99 - E0F48BF1 out of order segment: rcv_next E0F47CB5 seq E0F48BF1 - E0F48C49 out of order segment: rcv_next E0F47CB5 seq E0F48C49 - E0F48CF9 out of order segment: rcv_next E0F47CB5 seq E0F48CF9 - E0F48D51 out of order segment: rcv_next E0F47CB5 seq E0F48D51 - E0F48DA9 out of order segment: rcv_next E0F47CB5 seq E0F48DA9 - E0F48E59 out of order segment: rcv_next E0F47CB5 seq E0F48E59 - E0F48EB1 out of order segment: rcv_next E0F47CB5 seq E0F48EB1 - E0F48F09 out of order segment: rcv_next E0F47CB5 seq E0F48F09 - E0F48FB9 out of order segment: rcv_next E0F47CB5 seq E0F48FB9 - E0F49011 out of order segment: rcv_next E0F47CB5 seq E0F49011 - E0F49069 out of order segment: rcv_next E0F47CB5 seq E0F49069 - E0F49119 out of order segment: rcv_next E0F47CB5 seq E0F49119 - E0F49171 out of order segment: rcv_next E0F47CB5 seq E0F49171 - E0F491C9 out of order segment: rcv_next E0F47CB5 seq E0F491C9 - E0F49279 out of order segment: rcv_next E0F47CB5 seq E0F49279 - E0F492D1 out of order segment: rcv_next E0F47CB5 seq E0F492D1 - E0F49329 out of order segment: rcv_next E0F47CB5 seq E0F49329 - E0F493D9 out of order segment: rcv_next E0F47CB5 seq E0F493D9 - E0F49431 out of order segment: rcv_next E0F47CB5 seq E0F49431 - E0F49489 out of order segment: rcv_next E0F47CB5 seq E0F49489 - E0F49539 out of order segment: rcv_next E0F47CB5 seq E0F49539 - E0F49591 out of order segment: rcv_next E0F47CB5 seq E0F49591 - E0F495E9 out of order segment: rcv_next E0F47CB5 seq E0F495E9 - E0F49699 out of order segment: rcv_next E0F47CB5 seq E0F49699 - E0F496F1 out of order segment: rcv_next E0F47CB5 seq E0F496F1 - E0F49749 out of order segment: rcv_next E0F47CB5 seq E0F49749 - E0F497F9 out of order segment: rcv_next E0F47CB5 seq E0F497F9 - E0F49851 out of order segment: rcv_next E0F47CB5 seq E0F49851 - E0F498A9 out of order segment: rcv_next E0F47CB5 seq E0F498A9 - E0F49959 out of order segment: rcv_next E0F47CB5 seq E0F49959 - E0F499B1 out of order segment: rcv_next E0F47CB5 seq E0F499B1 - E0F49A09 out of order segment: rcv_next E0F47CB5 seq E0F49A09 - E0F49AB9 out of order segment: rcv_next E0F47CB5 seq E0F49AB9 - E0F49B11 out of order segment: rcv_next E0F47CB5 seq E0F49B11 - E0F49B69 out of order segment: rcv_next E0F47CB5 seq E0F49B69 - E0F49C19 out of order segment: rcv_next E0F47CB5 seq E0F49C19 - E0F49C71 out of order segment: rcv_next E0F47CB5 seq E0F49C71 - E0F49CC9 out of order segment: rcv_next E0F47CB5 seq E0F49CC9 - E0F49D79 out of order segment: rcv_next E0F47CB5 seq E0F49D79 - E0F49DD1 out of order segment: rcv_next E0F47CB5 seq E0F49DD1 - E0F49E29 out of order segment: rcv_next E0F47CB5 seq E0F49E29 - E0F49ED9 out of order segment: rcv_next E0F47CB5 seq E0F49ED9 - E0F49F31 out of order segment: rcv_next E0F47CB5 seq E0F49F31 - E0F49F89 out of order segment: rcv_next E0F47CB5 seq E0F49F89 - E0F4A039 out of order segment: rcv_next E0F47CB5 seq E0F4A039 - E0F4A091 out of order segment: rcv_next E0F47CB5 seq E0F4A091 - E0F4A0E9 out of order segment: rcv_next E0F47CB5 seq E0F4A0E9 - E0F4A199 out of order segment: rcv_next E0F47CB5 seq E0F4A199 - E0F4A1F1 out of order segment: rcv_next E0F47CB5 seq E0F4A1F1 - E0F4A249 out of order segment: rcv_next E0F47CB5 seq E0F4A249 - E0F4A2F9 out of order segment: rcv_next E0F47CB5 seq E0F4A2F9 - E0F4A351 out of order segment: rcv_next E0F47CB5 seq E0F4A351 - E0F4A3A9 : renamed from ip_vti0 out of order segment: rcv_next E0F47CB5 seq E0F4A3A9 - E0F4A459 out of order segment: rcv_next E0F47CB5 seq E0F4A459 - E0F4A4B1 out of order segment: rcv_next E0F47CB5 seq E0F4A4B1 - E0F4A509 out of order segment: rcv_next E0F47CB5 seq E0F4A509 - E0F4A5B9 out of order segment: rcv_next E0F47CB5 seq E0F4A5B9 - E0F4A611 out of order segment: rcv_next E0F47CB5 seq E0F4A611 - E0F4A669 out of order segment: rcv_next E0F47CB5 seq E0F4A669 - E0F4A719 out of order segment: rcv_next E0F47CB5 seq E0F4A719 - E0F4A771 out of order segment: rcv_next E0F47CB5 seq E0F4A771 - E0F4A7C9 out of order segment: rcv_next E0F47CB5 seq E0F4A7C9 - E0F4A879 out of order segment: rcv_next E0F47CB5 seq E0F4A879 - E0F4A8D1 out of order segment: rcv_next E0F47CB5 seq E0F4A8D1 - E0F4A929 out of order segment: rcv_next E0F47CB5 seq E0F4A929 - E0F4A9D9 : renamed from ip_vti0 out of order segment: rcv_next E0F47CB5 seq E0F4A9D9 - E0F4AA31 out of order segment: rcv_next E0F47CB5 seq E0F4AA31 - E0F4AA89 out of order segment: rcv_next E0F47CB5 seq E0F4AA89 - E0F4AB39 out of order segment: rcv_next E0F47CB5 seq E0F4ABE9 - E0F4AC55 ofo requeuing : rcv_next E0F47CB9 seq E0F47CB9 - E0F47D75 ofo requeuing : rcv_next E0F47D79 seq E0F47D79 - E0F47DD9 ofo requeuing : rcv_next E0F47DD9 seq E0F47DD9 - E0F47E89 ofo requeuing : rcv_next E0F47E89 seq E0F47E89 - E0F48671 ofo requeuing : rcv_next E0F48671 seq E0F48671 - E0F486C9 ofo requeuing : rcv_next E0F486C9 seq E0F486C9 - E0F48EB1 ofo requeuing : rcv_next E0F48EB1 seq E0F48EB1 - E0F48F09 ofo requeuing : rcv_next E0F48F09 seq E0F48F09 - E0F496F1 ofo requeuing : rcv_next E0F496F1 seq E0F496F1 - E0F49749 ofo requeuing : rcv_next E0F49749 seq E0F49749 - E0F49F31 ofo requeuing : rcv_next E0F49F31 seq E0F49F31 - E0F49F89 ofo requeuing : rcv_next E0F49F89 seq E0F49F89 - E0F4A771 ofo requeuing : rcv_next E0F4A771 seq E0F4A771 - E0F4A7C9 ofo requeuing : rcv_next E0F4A7C9 seq E0F4A7C9 - E0F4AB39 ofo requeuing : rcv_next E0F4ABE9 seq E0F4ABE9 - E0F4AC55 out of order segment: rcv_next E0F4AD71 seq E0F4AD75 - E0F4ADE1 out of order segment: rcv_next E0F4AD71 seq E0F4ADE1 - E0F4AE4D out of order segment: rcv_next E0F4AD71 seq E0F4AE4D - E0F4AEB9 out of order segment: rcv_next E0F4AD71 seq E0F4AEB9 - E0F4AF19 ofo requeuing : rcv_next E0F4AD75 seq E0F4AD75 - E0F4ADE1 ofo requeuing : rcv_next E0F4ADE1 seq E0F4ADE1 - E0F4AE4D ofo requeuing : rcv_next E0F4AE4D seq E0F4AE4D - E0F4AF19 out of order segment: rcv_next E0F4B1FD seq E0F4B20D - E0F4B2D5 out of order segment: rcv_next E0F4B1FD seq E0F4B2E5 - E0F4B351 out of order segment: rcv_next E0F4B1FD seq E0F4B351 - E0F4B3B1 out of order segment: rcv_next E0F4B1FD seq E0F4B3B1 - E0F4B409 ofo requeuing : rcv_next E0F4B20D seq E0F4B20D - E0F4B2D5 partial packet: rcv_next E0F4B2D5 seq E0F4B2D1 - E0F4B2E5 ofo requeuing : rcv_next E0F4B2E5 seq E0F4B2E5 - E0F4B351 ofo requeuing : rcv_next E0F4B351 seq E0F4B351 - E0F4B3B1 ofo requeuing : rcv_next E0F4B3B1 seq E0F4B3B1 - E0F4B409 out of order segment: rcv_next E0F4B5FD seq E0F4B60D - E0F4B679 out of order segment: rcv_next E0F4B5FD seq E0F4B679 - E0F4B735 out of order segment: rcv_next E0F4B5FD seq E0F4B739 - E0F4B799 out of order segment: rcv_next E0F4B5FD seq E0F4B799 - E0F4B7F1 ofo requeuing : rcv_next E0F4B60D seq E0F4B60D - E0F4B679 ofo requeuing : rcv_next E0F4B679 seq E0F4B679 - E0F4B735 partial packet: rcv_next E0F4B735 seq E0F4B6D9 - E0F4B739 ofo requeuing : rcv_next E0F4B739 seq E0F4B739 - E0F4B799 ofo requeuing : rcv_next E0F4B799 seq E0F4B799 - E0F4B7F1 netlink: 16 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 16 bytes leftover after parsing attributes in process `syz-executor.1'. device lo left promiscuous mode