All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+1bfacdf603474cfa86bd@syzkaller.appspotmail.com>
To: adilger.kernel@dilger.ca, bp@alien8.de, casey@schaufler-ca.com,
	 dave.hansen@linux.intel.com, hpa@zytor.com,
	linux-ext4@vger.kernel.org,  linux-kernel@vger.kernel.org,
	mingo@redhat.com, roberto.sassu@huawei.com,
	 syzkaller-bugs@googlegroups.com, tglx@linutronix.de,
	tytso@mit.edu,  x86@kernel.org
Subject: [syzbot] [ext4?] INFO: task hung in lock_two_directories (4)
Date: Thu, 22 May 2025 20:51:27 -0700	[thread overview]
Message-ID: <682ff0bf.a70a0220.1765ec.0148.GAE@google.com> (raw)

Hello,

syzbot found the following issue on:

HEAD commit:    a5806cd506af Linux 6.15-rc7
git tree:       upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=10defef4580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=3340af1a8845dd35
dashboard link: https://syzkaller.appspot.com/bug?extid=1bfacdf603474cfa86bd
compiler:       Debian clang version 20.1.2 (++20250402124445+58df0ef89dd6-1~exp1~20250402004600.97), Debian LLD 20.1.2
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=14f292d4580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=14e29e70580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/652000eacd92/disk-a5806cd5.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/2b445a74e31e/vmlinux-a5806cd5.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0a4ef01f165f/bzImage-a5806cd5.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/6f80bf89f51a/mount_0.gz
  fsck result: failed (log: https://syzkaller.appspot.com/x/fsck.log?x=10f7c1f4580000)

The issue was bisected to:

commit e63d86b8b76437815fc040e8e65da257c28ba922
Author: Roberto Sassu <roberto.sassu@huawei.com>
Date:   Thu Nov 16 09:01:24 2023 +0000

    smack: Initialize the in-memory inode in smack_inode_init_security()

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=148852d4580000
final oops:     https://syzkaller.appspot.com/x/report.txt?x=168852d4580000
console output: https://syzkaller.appspot.com/x/log.txt?x=128852d4580000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+1bfacdf603474cfa86bd@syzkaller.appspotmail.com
Fixes: e63d86b8b764 ("smack: Initialize the in-memory inode in smack_inode_init_security()")

INFO: task syz-executor125:5853 blocked for more than 143 seconds.
      Not tainted 6.15.0-rc7-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor125 state:D stack:28616 pid:5853  tgid:5847  ppid:5846   task_flags:0x400040 flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x168f/0x4c70 kernel/sched/core.c:6767
 __schedule_loop kernel/sched/core.c:6845 [inline]
 schedule+0x165/0x360 kernel/sched/core.c:6860
 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6917
 rwsem_down_write_slowpath+0xbec/0x1030 kernel/locking/rwsem.c:1176
 __down_write_common kernel/locking/rwsem.c:1304 [inline]
 __down_write kernel/locking/rwsem.c:1313 [inline]
 down_write_nested+0x1b5/0x200 kernel/locking/rwsem.c:1694
 inode_lock_nested include/linux/fs.h:902 [inline]
 lock_two_directories+0x16b/0x220 fs/namei.c:3236
 lock_rename fs/namei.c:3270 [inline]
 do_renameat2+0x38a/0xc50 fs/namei.c:5216
 __do_sys_rename fs/namei.c:5317 [inline]
 __se_sys_rename fs/namei.c:5315 [inline]
 __x64_sys_rename+0x82/0x90 fs/namei.c:5315
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f58ce457489
RSP: 002b:00007f58ce3ea168 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 00007f58ce4de6b8 RCX: 00007f58ce457489
RDX: 0030656c69662f30 RSI: 00002000000001c0 RDI: 0000200000000000
RBP: 00007f58ce4de6b0 R08: 00007ffff522f7d7 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f58ce4de6bc
R13: 000000000000006e R14: 00007ffff522f6f0 R15: 00007ffff522f7d8
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/31:
 #0: ffffffff8df3dee0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
 #0: ffffffff8df3dee0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline]
 #0: ffffffff8df3dee0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180 kernel/locking/lockdep.c:6764
2 locks held by getty/5581:
 #0: ffff88814cb7c0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc900030062f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x43e/0x1400 drivers/tty/n_tty.c:2222
3 locks held by syz-executor125/5849:
4 locks held by syz-executor125/5853:
 #0: ffff8880353d6420 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:556
 #1: ffff8880353d6730 (&type->s_vfs_rename_key){+.+.}-{4:4}, at: lock_rename fs/namei.c:3269 [inline]
 #1: ffff8880353d6730 (&type->s_vfs_rename_key){+.+.}-{4:4}, at: do_renameat2+0x37f/0xc50 fs/namei.c:5216
 #2: ffff88807b085d60 (&type->i_mutex_dir_key#3/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:902 [inline]
 #2: ffff88807b085d60 (&type->i_mutex_dir_key#3/1){+.+.}-{4:4}, at: lock_two_directories+0x141/0x220 fs/namei.c:3235
 #3: ffff88807b329808 (&type->i_mutex_dir_key#3/5){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:902 [inline]
 #3: ffff88807b329808 (&type->i_mutex_dir_key#3/5){+.+.}-{4:4}, at: lock_two_directories+0x16b/0x220 fs/namei.c:3236

=============================================

NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 31 Comm: khungtaskd Not tainted 6.15.0-rc7-syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 nmi_cpu_backtrace+0x39e/0x3d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x17a/0x300 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:158 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:274 [inline]
 watchdog+0xfee/0x1030 kernel/hung_task.c:437
 kthread+0x711/0x8a0 kernel/kthread.c:464
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 5849 Comm: syz-executor125 Not tainted 6.15.0-rc7-syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:get_current arch/x86/include/asm/current.h:25 [inline]
RIP: 0010:write_comp_data kernel/kcov.c:245 [inline]
RIP: 0010:__sanitizer_cov_trace_const_cmp8+0x8/0x90 kernel/kcov.c:321
Code: 48 89 44 11 20 c3 cc cc cc cc cc 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 48 8b 04 24 <65> 48 8b 0c 25 08 a0 72 92 65 8b 15 58 aa b2 10 81 e2 00 01 ff 00
RSP: 0018:ffffc900044d6ef8 EFLAGS: 00000246
RAX: ffffffff826f434a RBX: 1ffff9200089adf8 RCX: ffffffff826f431d
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900044d7090 R08: ffff8880778b39ff R09: 1ffff1100ef1673f
R10: dffffc0000000000 R11: ffffed100ef16740 R12: 000000000000000e
R13: 1ffff1100ef1673f R14: 000000000000601b R15: ffff8880778b39f8
FS:  00007f58ce40b6c0(0000) GS:ffff8881261f6000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055d3b19b24b0 CR3: 0000000034b24000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ext4_buffer_uptodate fs/ext4/ext4.h:3842 [inline]
 __ext4_get_inode_loc+0x5aa/0x1040 fs/ext4/inode.c:4458
 ext4_get_inode_loc fs/ext4/inode.c:4583 [inline]
 ext4_reserve_inode_write+0x191/0x330 fs/ext4/inode.c:5889
 __ext4_mark_inode_dirty+0x15b/0x700 fs/ext4/inode.c:6066
 ext4_dirty_inode+0xd0/0x110 fs/ext4/inode.c:6103
 __mark_inode_dirty+0x2d1/0xdf0 fs/fs-writeback.c:2527
 mark_inode_dirty include/linux/fs.h:2545 [inline]
 dquot_alloc_space include/linux/quotaops.h:319 [inline]
 dquot_alloc_block include/linux/quotaops.h:336 [inline]
 ext4_xattr_block_set+0x12ca/0x2ac0 fs/ext4/xattr.c:2048
 ext4_xattr_set_handle+0xdfb/0x1590 fs/ext4/xattr.c:2447
 ext4_initxattrs+0x9f/0x110 fs/ext4/xattr_security.c:44
 security_inode_init_security+0x2a0/0x3f0 security/security.c:1852
 __ext4_new_inode+0x3257/0x3bd0 fs/ext4/ialloc.c:1326
 ext4_create+0x22d/0x460 fs/ext4/namei.c:2824
 lookup_open fs/namei.c:3701 [inline]
 open_last_lookups fs/namei.c:3800 [inline]
 path_openat+0x14f1/0x3830 fs/namei.c:4036
 do_filp_open+0x1fa/0x410 fs/namei.c:4066
 do_sys_openat2+0x121/0x1c0 fs/open.c:1429
 do_sys_open fs/open.c:1444 [inline]
 __do_sys_openat fs/open.c:1460 [inline]
 __se_sys_openat fs/open.c:1455 [inline]
 __x64_sys_openat+0x138/0x170 fs/open.c:1455
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f58ce457489
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 18 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f58ce40b168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f58ce4de6a8 RCX: 00007f58ce457489
RDX: 0000000000101042 RSI: 0000200000000140 RDI: 00000000ffffff9c
RBP: 00007f58ce4de6a0 R08: 00007f58ce40b6c0 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000246 R12: 00007f58ce4de6ac
R13: 0000000000000006 R14: 00007ffff522f6f0 R15: 00007ffff522f7d8
 </TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.394 msecs


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

             reply	other threads:[~2025-05-23  3:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-23  3:51 syzbot [this message]
2025-09-03 12:50 ` [syzbot] [exfat?] INFO: task hung in lock_two_directories (4) syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=682ff0bf.a70a0220.1765ec.0148.GAE@google.com \
    --to=syzbot+1bfacdf603474cfa86bd@syzkaller.appspotmail.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=bp@alien8.de \
    --cc=casey@schaufler-ca.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=roberto.sassu@huawei.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@linutronix.de \
    --cc=tytso@mit.edu \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.