loop0: detected capacity change from 0 to 32768 ======================================================= WARNING: The mand mount option has been deprecated and and is ignored by this kernel. Remove the mand option from the mount to silence this warning. ======================================================= JBD2: Ignoring recovery information on journal ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode. ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.0/5355 is trying to acquire lock: ffff88805215bf60 (&oi->ip_alloc_sem){++++}-{4:4}, at: ocfs2_page_mkwrite+0x2ff/0xc40 fs/ocfs2/mmap.c:142 but task is already holding lock: ffff888011c78520 (sb_pagefaults){.+.+}-{0:0}, at: do_page_mkwrite+0x14d/0x310 mm/memory.c:3361 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (sb_pagefaults){.+.+}-{0:0}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline] percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline] __sb_start_write include/linux/fs.h:1798 [inline] sb_start_pagefault include/linux/fs.h:1963 [inline] ocfs2_page_mkwrite+0x1da/0xc40 fs/ocfs2/mmap.c:122 do_page_mkwrite+0x14d/0x310 mm/memory.c:3361 wp_page_shared mm/memory.c:3762 [inline] do_wp_page+0x268d/0x5800 mm/memory.c:3981 handle_pte_fault mm/memory.c:6068 [inline] __handle_mm_fault+0x1033/0x5440 mm/memory.c:6195 handle_mm_fault+0x40a/0x8e0 mm/memory.c:6364 do_user_addr_fault+0x764/0x1390 arch/x86/mm/fault.c:1387 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x76/0xf0 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 rep_movs_alternative+0x4a/0x90 arch/x86/lib/copy_user_64.S:68 copy_user_generic arch/x86/include/asm/uaccess_64.h:126 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:147 [inline] _inline_copy_to_user include/linux/uaccess.h:197 [inline] _copy_to_user+0x8a/0xb0 lib/usercopy.c:26 copy_to_user include/linux/uaccess.h:225 [inline] __do_sys_newuname kernel/sys.c:1358 [inline] __se_sys_newuname+0x128/0x380 kernel/sys.c:1351 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (&mm->mmap_lock){++++}-{4:4}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __might_fault+0xcc/0x130 mm/memory.c:6958 _inline_copy_to_user include/linux/uaccess.h:192 [inline] _copy_to_user+0x2c/0xb0 lib/usercopy.c:26 copy_to_user include/linux/uaccess.h:225 [inline] fiemap_fill_next_extent+0x1c0/0x390 fs/ioctl.c:145 ocfs2_fiemap+0x888/0xc90 fs/ocfs2/extent_map.c:806 ioctl_fiemap fs/ioctl.c:220 [inline] do_vfs_ioctl+0x1170/0x1430 fs/ioctl.c:532 __do_sys_ioctl fs/ioctl.c:596 [inline] __se_sys_ioctl+0x82/0x170 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&oi->ip_alloc_sem){++++}-{4:4}: check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3908 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 down_write+0x96/0x1f0 kernel/locking/rwsem.c:1590 ocfs2_page_mkwrite+0x2ff/0xc40 fs/ocfs2/mmap.c:142 do_page_mkwrite+0x14d/0x310 mm/memory.c:3361 wp_page_shared mm/memory.c:3762 [inline] do_wp_page+0x268d/0x5800 mm/memory.c:3981 handle_pte_fault mm/memory.c:6068 [inline] __handle_mm_fault+0x1033/0x5440 mm/memory.c:6195 handle_mm_fault+0x40a/0x8e0 mm/memory.c:6364 do_user_addr_fault+0x764/0x1390 arch/x86/mm/fault.c:1387 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x76/0xf0 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 rep_movs_alternative+0x4a/0x90 arch/x86/lib/copy_user_64.S:68 copy_user_generic arch/x86/include/asm/uaccess_64.h:126 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:147 [inline] _inline_copy_to_user include/linux/uaccess.h:197 [inline] _copy_to_user+0x8a/0xb0 lib/usercopy.c:26 copy_to_user include/linux/uaccess.h:225 [inline] __do_sys_newuname kernel/sys.c:1358 [inline] __se_sys_newuname+0x128/0x380 kernel/sys.c:1351 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: &oi->ip_alloc_sem --> &mm->mmap_lock --> sb_pagefaults Possible unsafe locking scenario: CPU0 CPU1 ---- ---- rlock(sb_pagefaults); lock(&mm->mmap_lock); lock(sb_pagefaults); lock(&oi->ip_alloc_sem); *** DEADLOCK *** 2 locks held by syz.0.0/5355: #0: ffff888035cc4d20 (&mm->mmap_lock){++++}-{4:4}, at: mmap_read_trylock include/linux/mmap_lock.h:472 [inline] #0: ffff888035cc4d20 (&mm->mmap_lock){++++}-{4:4}, at: get_mmap_lock_carefully mm/mmap_lock.c:277 [inline] #0: ffff888035cc4d20 (&mm->mmap_lock){++++}-{4:4}, at: lock_mm_and_find_vma+0x32/0x300 mm/mmap_lock.c:337 #1: ffff888011c78520 (sb_pagefaults){.+.+}-{0:0}, at: do_page_mkwrite+0x14d/0x310 mm/memory.c:3361 stack backtrace: CPU: 0 UID: 0 PID: 5355 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_circular_bug+0x2ee/0x310 kernel/locking/lockdep.c:2043 check_noncircular+0x134/0x160 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3908 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 down_write+0x96/0x1f0 kernel/locking/rwsem.c:1590 ocfs2_page_mkwrite+0x2ff/0xc40 fs/ocfs2/mmap.c:142 do_page_mkwrite+0x14d/0x310 mm/memory.c:3361 wp_page_shared mm/memory.c:3762 [inline] do_wp_page+0x268d/0x5800 mm/memory.c:3981 handle_pte_fault mm/memory.c:6068 [inline] __handle_mm_fault+0x1033/0x5440 mm/memory.c:6195 handle_mm_fault+0x40a/0x8e0 mm/memory.c:6364 do_user_addr_fault+0x764/0x1390 arch/x86/mm/fault.c:1387 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x76/0xf0 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0010:rep_movs_alternative+0x4a/0x90 arch/x86/lib/copy_user_64.S:74 Code: 09 04 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 8b 06 48 89 07 48 83 c6 08 48 83 c7 08 83 e9 08 74 db 83 f9 08 73 e8 eb c5 a4 c3 cc cc cc cc 48 8b 06 48 89 07 48 8d 47 08 48 83 e0 f8 48 RSP: 0018:ffffc9000d3b7bc8 EFLAGS: 00050202 RAX: ffffffff84c9a501 RBX: 0000000000000186 RCX: 0000000000000186 RDX: 0000000000000000 RSI: ffffc9000d3b7cb0 RDI: 0000200000000200 RBP: ffffc9000d3b7ee0 R08: 0000000000000005 R09: 0000000000000006 R10: dffffc0000000000 R11: fffff52001a76fc6 R12: 0000200000000386 R13: 00007ffffffff000 R14: ffffc9000d3b7cb0 R15: 0000200000000200 copy_user_generic arch/x86/include/asm/uaccess_64.h:126 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:147 [inline] _inline_copy_to_user include/linux/uaccess.h:197 [inline] _copy_to_user+0x8a/0xb0 lib/usercopy.c:26 copy_to_user include/linux/uaccess.h:225 [inline] __do_sys_newuname kernel/sys.c:1358 [inline] __se_sys_newuname+0x128/0x380 kernel/sys.c:1351 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff40618ebe9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff4070c6038 EFLAGS: 00000246 ORIG_RAX: 000000000000003f RAX: ffffffffffffffda RBX: 00007ff4063b5fa0 RCX: 00007ff40618ebe9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000200000000200 RBP: 00007ff406211e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ff4063b6038 R14: 00007ff4063b5fa0 R15: 00007ffe846cc798 ---------------- Code disassembly (best guess): 0: 09 04 00 or %eax,(%rax,%rax,1) 3: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) a: 00 00 00 d: 0f 1f 00 nopl (%rax) 10: 48 8b 06 mov (%rsi),%rax 13: 48 89 07 mov %rax,(%rdi) 16: 48 83 c6 08 add $0x8,%rsi 1a: 48 83 c7 08 add $0x8,%rdi 1e: 83 e9 08 sub $0x8,%ecx 21: 74 db je 0xfffffffe 23: 83 f9 08 cmp $0x8,%ecx 26: 73 e8 jae 0x10 28: eb c5 jmp 0xffffffef * 2a: f3 a4 rep movsb %ds:(%rsi),%es:(%rdi) <-- trapping instruction 2c: c3 ret 2d: cc int3 2e: cc int3 2f: cc int3 30: cc int3 31: 48 8b 06 mov (%rsi),%rax 34: 48 89 07 mov %rax,(%rdi) 37: 48 8d 47 08 lea 0x8(%rdi),%rax 3b: 48 83 e0 f8 and $0xfffffffffffffff8,%rax 3f: 48 rex.W