github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/pkg/report/testdata/linux/guilty/61 (about)

     1  FILE: 
     2  
     3  ======================================================
     4  WARNING: possible circular locking dependency detected
     5  6.2.0-rc6-syzkaller-00163-g66a87fff1a87 #0 Not tainted
     6  ------------------------------------------------------
     7  syz-executor.3/1006 is trying to acquire lock:
     8  ffff88814b6c4650 (sb_internal){.+.+}-{0:0}, at: ext4_evict_inode+0x53d/0x1230
     9  
    10  but task is already holding lock:
    11  ffff88814b6c6b98 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_ext_migrate+0x2e2/0x1310
    12  
    13  which lock already depends on the new lock.
    14  
    15  
    16  the existing dependency chain (in reverse order) is:
    17  
    18  -> #3 (&sbi->s_writepages_rwsem){++++}-{0:0}:
    19         lock_acquire+0x20b/0x600
    20         percpu_down_write+0x54/0x2f0
    21         ext4_ind_migrate+0x258/0x760
    22         ext4_fileattr_set+0xe94/0x1770
    23         vfs_fileattr_set+0x8f2/0xd30
    24         do_vfs_ioctl+0x1dbe/0x2a40
    25         __se_sys_ioctl+0x81/0x160
    26         do_syscall_64+0x41/0xc0
    27         entry_SYSCALL_64_after_hwframe+0x63/0xcd
    28  
    29  -> #2 (&sb->s_type->i_mutex_key#8){++++}-{3:3}:
    30         lock_acquire+0x20b/0x600
    31         down_read+0x3d/0x50
    32         ext4_bmap+0x4f/0x410
    33         bmap+0xa5/0xe0
    34         jbd2_journal_flush+0x5b6/0xc40
    35         ext4_ioctl+0x39b9/0x6130
    36         __se_sys_ioctl+0xf1/0x160
    37         do_syscall_64+0x41/0xc0
    38         entry_SYSCALL_64_after_hwframe+0x63/0xcd
    39  
    40  -> #1 (&journal->j_checkpoint_mutex){+.+.}-{3:3}:
    41         lock_acquire+0x20b/0x600
    42         __mutex_lock_common+0x1c2/0x2630
    43         mutex_lock_io_nested+0x47/0x60
    44         __jbd2_log_wait_for_space+0x209/0x6c0
    45         add_transaction_credits+0x94a/0xc00
    46         start_this_handle+0x739/0x1660
    47         jbd2__journal_start+0x2d5/0x5d0
    48         __ext4_journal_start_sb+0x363/0x880
    49         ext4_evict_inode+0x9b0/0x1230
    50         evict+0x2a4/0x620
    51         do_unlinkat+0x4ad/0x8c0
    52         __x64_sys_unlink+0x49/0x50
    53         do_syscall_64+0x41/0xc0
    54         entry_SYSCALL_64_after_hwframe+0x63/0xcd
    55  
    56  -> #0 (sb_internal){.+.+}-{0:0}:
    57         validate_chain+0x166b/0x5860
    58         __lock_acquire+0x125b/0x1f80
    59         lock_acquire+0x20b/0x600
    60         percpu_down_read+0x44/0x190
    61         ext4_evict_inode+0x53d/0x1230
    62         evict+0x2a4/0x620
    63         ext4_ext_migrate+0x102a/0x1310
    64         ext4_ioctl+0x1caf/0x6130
    65         __se_sys_ioctl+0xf1/0x160
    66         do_syscall_64+0x41/0xc0
    67         entry_SYSCALL_64_after_hwframe+0x63/0xcd
    68  
    69  other info that might help us debug this:
    70  
    71  Chain exists of:
    72    sb_internal --> &sb->s_type->i_mutex_key#8 --> &sbi->s_writepages_rwsem
    73  
    74   Possible unsafe locking scenario:
    75  
    76         CPU0                    CPU1
    77         ----                    ----
    78    lock(&sbi->s_writepages_rwsem);
    79                                 lock(&sb->s_type->i_mutex_key#8);
    80                                 lock(&sbi->s_writepages_rwsem);
    81    lock(sb_internal);
    82  
    83   *** DEADLOCK ***
    84  
    85  3 locks held by syz-executor.3/1006:
    86   #0: ffff88814b6c4460 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write_file+0x5e/0x1f0
    87   #1: ffff888051572218 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: ext4_ioctl+0x1ca7/0x6130
    88   #2: ffff88814b6c6b98 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_ext_migrate+0x2e2/0x1310
    89  
    90  stack backtrace:
    91  CPU: 0 PID: 1006 Comm: syz-executor.3 Not tainted 6.2.0-rc6-syzkaller-00163-g66a87fff1a87 #0
    92  Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
    93  Call Trace:
    94   <TASK>
    95   dump_stack_lvl+0x1b5/0x2a0
    96   check_noncircular+0x2d1/0x390
    97   validate_chain+0x166b/0x5860
    98   __lock_acquire+0x125b/0x1f80
    99   lock_acquire+0x20b/0x600
   100   percpu_down_read+0x44/0x190
   101   ext4_evict_inode+0x53d/0x1230
   102   evict+0x2a4/0x620
   103   ext4_ext_migrate+0x102a/0x1310
   104   ext4_ioctl+0x1caf/0x6130
   105   __se_sys_ioctl+0xf1/0x160
   106   do_syscall_64+0x41/0xc0
   107   entry_SYSCALL_64_after_hwframe+0x63/0xcd
   108  RIP: 0033:0x7f275948c0c9
   109  Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
   110  RSP: 002b:00007f275a288168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
   111  RAX: ffffffffffffffda RBX: 00007f27595abf80 RCX: 00007f275948c0c9
   112  RDX: 0000000000000000 RSI: 0000000000006609 RDI: 0000000000000003
   113  RBP: 00007f27594e7ae9 R08: 0000000000000000 R09: 0000000000000000
   114  R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
   115  R13: 00007ffe180057ef R14: 00007f275a288300 R15: 0000000000022000
   116   </TASK>