====================================================== WARNING: possible circular locking dependency detected 6.0.0-rc1-next-20220822 #1 Not tainted ------------------------------------------------------ syz-executor.6/125117 is trying to acquire lock: ffff88800fea23f8 (&journal->j_checkpoint_mutex){+.+.}-{3:3}, at: __jbd2_log_wait_for_space+0x234/0x460 but task is already holding lock: ffff88800fe96530 (sb_pagefaults){.+.+}-{0:0}, at: do_page_mkwrite+0x1ac/0x500 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (sb_pagefaults){.+.+}-{0:0}: ext4_page_mkwrite+0x1fe/0x1a70 do_page_mkwrite+0x1ac/0x500 __handle_mm_fault+0x12c7/0x34e0 handle_mm_fault+0x2e6/0xa20 do_user_addr_fault+0x536/0x1300 exc_page_fault+0x98/0x1a0 asm_exc_page_fault+0x22/0x30 -> #2 (&mm->mmap_lock#2){++++}-{3:3}: internal_get_user_pages_fast+0x1327/0x3220 get_user_pages_fast+0x66/0xa0 __iov_iter_get_pages_alloc+0x38d/0x2290 iov_iter_get_pages2+0xa4/0x100 bio_iov_iter_get_pages+0x1da/0x10b0 iomap_dio_bio_iter+0x92f/0x1510 __iomap_dio_rw+0xe14/0x1bd0 iomap_dio_rw+0x3c/0xa0 ext4_file_write_iter+0xa96/0x1820 vfs_write+0x9c3/0xd90 __x64_sys_pwrite64+0x1fb/0x260 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #1 (&sb->s_type->i_mutex_key#6){++++}-{3:3}: down_read+0x98/0x450 ext4_bmap+0x4e/0x470 bmap+0xac/0x120 jbd2_journal_bmap+0xa8/0x180 jbd2_journal_flush+0x853/0xc00 __ext4_ioctl+0x9e9/0x4090 __x64_sys_ioctl+0x19a/0x210 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #0 (&journal->j_checkpoint_mutex){+.+.}-{3:3}: __lock_acquire+0x2a02/0x5e70 lock_acquire+0x1a2/0x530 mutex_lock_io_nested+0x148/0x1310 __jbd2_log_wait_for_space+0x234/0x460 add_transaction_credits+0xa42/0xb80 start_this_handle+0x3ac/0x14c0 jbd2__journal_start+0x390/0x8d0 __ext4_journal_start_sb+0x391/0x470 ext4_dirty_inode+0x9d/0x110 __mark_inode_dirty+0x455/0xf00 generic_update_time+0x26b/0x410 file_update_time+0x22b/0x280 ext4_page_mkwrite+0x2f3/0x1a70 do_page_mkwrite+0x1ac/0x500 __handle_mm_fault+0x12c7/0x34e0 handle_mm_fault+0x2e6/0xa20 do_user_addr_fault+0x536/0x1300 exc_page_fault+0x98/0x1a0 asm_exc_page_fault+0x22/0x30 other info that might help us debug this: Chain exists of: &journal->j_checkpoint_mutex --> &mm->mmap_lock#2 --> sb_pagefaults Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sb_pagefaults); lock(&mm->mmap_lock#2); lock(sb_pagefaults); lock(&journal->j_checkpoint_mutex); *** DEADLOCK *** 2 locks held by syz-executor.6/125117: #0: ffff888047ed9628 (&mm->mmap_lock#2){++++}-{3:3}, at: do_user_addr_fault+0x337/0x1300 #1: ffff88800fe96530 (sb_pagefaults){.+.+}-{0:0}, at: do_page_mkwrite+0x1ac/0x500 stack backtrace: CPU: 1 PID: 125117 Comm: syz-executor.6 Not tainted 6.0.0-rc1-next-20220822 #1 BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1521 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 125117, name: syz-executor.6 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 INFO: lockdep is turned off. irq event stamp: 1853 hardirqs last enabled at (1853): [] _raw_spin_unlock_irqrestore+0x28/0x60 hardirqs last disabled at (1852): [] _raw_spin_lock_irqsave+0x52/0x60 softirqs last enabled at (1592): [] fpu_clone+0x3c2/0xb00 softirqs last disabled at (1590): [] fpu_clone+0x335/0xb00 Preemption disabled at: [] mutex_lock_io_nested+0x126/0x1310 CPU: 1 PID: 125117 Comm: syz-executor.6 Not tainted 6.0.0-rc1-next-20220822 #1 syz-executor.6[125117] cmdline: /syz-executor.6 exec Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x8b/0xb3 __might_resched.cold+0x222/0x26b down_read_killable+0x75/0x490 __access_remote_vm+0xac/0x6f0 get_mm_cmdline.part.0+0x214/0x600 get_task_cmdline_kernel+0x1e9/0x230 dump_stack_print_cmdline.part.0+0x82/0x150 dump_stack_print_info+0x185/0x190 dump_stack_lvl+0x7f/0xb3 check_noncircular+0x263/0x2e0 __lock_acquire+0x2a02/0x5e70 lock_acquire+0x1a2/0x530 mutex_lock_io_nested+0x148/0x1310 __jbd2_log_wait_for_space+0x234/0x460 add_transaction_credits+0xa42/0xb80 start_this_handle+0x3ac/0x14c0 jbd2__journal_start+0x390/0x8d0 __ext4_journal_start_sb+0x391/0x470 ext4_dirty_inode+0x9d/0x110 __mark_inode_dirty+0x455/0xf00 generic_update_time+0x26b/0x410 file_update_time+0x22b/0x280 ext4_page_mkwrite+0x2f3/0x1a70 do_page_mkwrite+0x1ac/0x500 __handle_mm_fault+0x12c7/0x34e0 handle_mm_fault+0x2e6/0xa20 do_user_addr_fault+0x536/0x1300 exc_page_fault+0x98/0x1a0 asm_exc_page_fault+0x22/0x30 RIP: 0033:0x7f8df33e9673 Code: 5d c3 0f 1f 44 00 00 48 8b 0d 59 ed 0a 01 48 8b 05 4a ed 0a 01 4c 8d 81 00 00 00 01 48 39 c8 72 13 4c 39 c0 73 0e 48 8d 50 04 <89> 38 48 89 15 2c ed 0a 01 c3 52 48 8d 35 77 b7 0b 00 48 89 c2 48 RSP: 002b:00007ffd4e5b8f28 EFLAGS: 00010287 RAX: 0000001b2df21000 RBX: 00007f8df31c3008 RCX: 0000001b2df20000 RDX: 0000001b2df21004 RSI: ffffffff81542763 RDI: 000000001c830684 RBP: 0000000000000001 R08: 0000001b2ef20000 R09: 0000001b2df2001c R10: 0000000000000684 R11: 000000001c830688 R12: 0000000000002c4c R13: 00007f8df3553000 R14: ffffffff81542763 R15: 00007f8df355eff0 syz-executor.6[125117] cmdline: /syz-executor.6 exec Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x8b/0xb3 check_noncircular+0x263/0x2e0 __lock_acquire+0x2a02/0x5e70 lock_acquire+0x1a2/0x530 mutex_lock_io_nested+0x148/0x1310 __jbd2_log_wait_for_space+0x234/0x460 add_transaction_credits+0xa42/0xb80 start_this_handle+0x3ac/0x14c0 jbd2__journal_start+0x390/0x8d0 __ext4_journal_start_sb+0x391/0x470 ext4_dirty_inode+0x9d/0x110 __mark_inode_dirty+0x455/0xf00 generic_update_time+0x26b/0x410 file_update_time+0x22b/0x280 ext4_page_mkwrite+0x2f3/0x1a70 do_page_mkwrite+0x1ac/0x500 __handle_mm_fault+0x12c7/0x34e0 handle_mm_fault+0x2e6/0xa20 do_user_addr_fault+0x536/0x1300 exc_page_fault+0x98/0x1a0 asm_exc_page_fault+0x22/0x30 RIP: 0033:0x7f8df33e9673 Code: 5d c3 0f 1f 44 00 00 48 8b 0d 59 ed 0a 01 48 8b 05 4a ed 0a 01 4c 8d 81 00 00 00 01 48 39 c8 72 13 4c 39 c0 73 0e 48 8d 50 04 <89> 38 48 89 15 2c ed 0a 01 c3 52 48 8d 35 77 b7 0b 00 48 89 c2 48 RSP: 002b:00007ffd4e5b8f28 EFLAGS: 00010287 RAX: 0000001b2df21000 RBX: 00007f8df31c3008 RCX: 0000001b2df20000 RDX: 0000001b2df21004 RSI: ffffffff81542763 RDI: 000000001c830684 RBP: 0000000000000001 R08: 0000001b2ef20000 R09: 0000001b2df2001c R10: 0000000000000684 R11: 000000001c830688 R12: 0000000000002c4c R13: 00007f8df3553000 R14: ffffffff81542763 R15: 00007f8df355eff0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 netlink: 20 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 20 bytes leftover after parsing attributes in process `syz-executor.5'. warning: checkpointing journal with EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT can be slow device syz_tun entered promiscuous mode device syz_tun left promiscuous mode device syz_tun entered promiscuous mode device syz_tun left promiscuous mode device syz_tun entered promiscuous mode device syz_tun left promiscuous mode device syz_tun entered promiscuous mode device syz_tun left promiscuous mode device syz_tun entered promiscuous mode device syz_tun left promiscuous mode device syz_tun entered promiscuous mode device syz_tun left promiscuous mode device syz_tun entered promiscuous mode device syz_tun left promiscuous mode sr 1:0:0:0: [sr0] tag#0 unaligned transfer blk_print_req_error: 570 callbacks suppressed I/O error, dev sr0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 buffer_io_error: 570 callbacks suppressed Buffer I/O error on dev sr0, logical block 0, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 2 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 1, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 4 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 2, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 6 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 3, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 0, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 2 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 1, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 4 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 2, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 6 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 3, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 0, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer I/O error, dev sr0, sector 2 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev sr0, logical block 1, async page read sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer sr 1:0:0:0: [sr0] tag#0 unaligned transfer blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 blktrace: Concurrent blktraces are not allowed on sg0 ieee80211 phy18: Selected rate control algorithm 'minstrel_ht' ieee80211 phy19: Selected rate control algorithm 'minstrel_ht' ieee80211 phy20: Selected rate control algorithm 'minstrel_ht'