From nobody Thu Apr 2 22:22:22 2026 Received: from mail-oo1-f72.google.com (mail-oo1-f72.google.com [209.85.161.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95DA2212554 for ; Sat, 14 Feb 2026 12:00:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771070442; cv=none; b=Z5b886k6Y+6A8FIcqn7i0LgSU1w7Ukvqpfh0mYa4UfN2yuy1wWdLS17ePP45dEIHu4pvVAOI1s0rWs5OOVyugDLUW9ZqY8j4iAn8jYePtvTGh0eYd5sxr/h3PaTvPjeroe2XOQCpMBq4+/Eip0vLDM9QjxhvZOM9LzeZ8IWAcNU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771070442; c=relaxed/simple; bh=Y+5ARxXLBLzhPoht6IKdIBSBqxyW2SbR1Hv1VIbK67E=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=AWz6w/vFcSmKdzSQDxXJOlRVOzrh2SRGRFN7Ml07e2v2At3C6mIYwp+SWt88+M1uZOOsJIiwvN6vCivoyNfr0j935iNe0v88IQi2jL6Pl1seDVCIwXI04FFOYIvxrA4c9d2IHJmljM8hzsHqwtDvaQxAgj19H68WuVnsoEp2FfY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.161.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oo1-f72.google.com with SMTP id 006d021491bc7-66b47c7a795so9409057eaf.2 for ; Sat, 14 Feb 2026 04:00:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771070439; x=1771675239; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6x49iKj23c0knY8XAzpBfeRD0ENLtbY053wz4Hzdp/U=; b=br+oWWjZ1WyI9lVlVmZsd9qpCX+rJIxXekqiPYettjp7+qyaOSJ0uGXqjxLVbMn6VW IvUmrQSEFYDDDc7E6hETSp0aKuEXzOXCzAl7dy5vq0MBSJr603dohLxJa3jQS1PYIpzl 2gj66klEOCOuEDGzve6xUcx+hdcWQVfgMwTRajmKzOQN+ASZiuXVetQaMqYdy5LZzfXx XUu2LBGVArywKdBLGohwmPb6Xg7upanO7MRu/oD1wMsThRlkTi6qDJhaec9wJIbklhzP jpdCNKSL9p+xDisbTzqotxRM3CYuq80JE6o5D1FhFgDoh9meuu3jyPgoUpcZNFl2wYE1 OC2Q== X-Gm-Message-State: AOJu0YylUhxxdkU5bfXoM+Kt8mnBFQTjVJrSkhvXVnauYZfRzsHw+wCe rl5XclxZFQeeQMB5r700+e3InttfntQ/ssZb2Syjo0qTCVXS79h7mEzMwuCBTz76dqxbjO6z3JZ hMOx3dCCGdd3ZQIk8NUtYr3syv1eJf1PlHNY9/XptCR7IkyxbzkRdTSmJkU4= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a4a:bc94:0:b0:677:520a:b91a with SMTP id 006d021491bc7-6775219ff33mr1918558eaf.51.1771070436376; Sat, 14 Feb 2026 04:00:36 -0800 (PST) Date: Sat, 14 Feb 2026 04:00:36 -0800 In-Reply-To: <699000b2.050a0220.3a4a67.00a6.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <699063e4.050a0220.2757fb.0026.GAE@google.com> Subject: Forwarded: Private message regarding: [syzbot] [xfs?] inconsistent lock state in igrab From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: Private message regarding: [syzbot] [xfs?] inconsistent lock state= in igrab Author: kapoorarnav43@gmail.com #syz test From 7e7a6c0e2d9a2d7b9f9a4f5b1b0f2a1c7f0a1234 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 14 Feb 2026 12:00:00 +0000 Subject: [PATCH] fs: fserror: avoid igrab in atomic contexts MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit fserror_report() can be called from softirq/atomic contexts (e.g. I/O endio paths). Using igrab() there takes i_lock, which is also acquired with softirqs enabled in process context, triggering lockdep warnings and a potential softirq recursion deadlock. All fserror_report() callers already hold a live reference to the inode, so use ihold() to take a safe reference without grabbing i_lock. Reported-by: syzbot+5eb0d61dfb76ca12670c@syzkaller.appspotmail.com Signed-off-by: Your Name Reported-by: syzbot+5eb0d6...@syzkaller.appspotmail.com=20 --- fs/fserror.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/fs/fserror.c b/fs/fserror.c index 0123456789ab..fedcba987654 100644 --- a/fs/fserror.c +++ b/fs/fserror.c @@ -159,16 +159,13 @@ void fserror_report(struct super_block *sb, struct=20 inode *inode, event->len =3D len; event->error =3D error; /* - * Can't iput from non-sleeping context, so grabbing another reference - * to the inode must be the last thing before submitting the event. + * Can't iput from non-sleeping context, so grabbing another reference + * to the inode must be the last thing before submitting the event. + * The caller must hold a live reference if @inode is provided. */ if (inode) { - event->inode =3D igrab(inode); - if (!event->inode) - goto lost_event; + ihold(inode); + event->inode =3D inode; } /* @@ -184,9 +181,7 @@ void fserror_report(struct super_block *sb, struct=20 inode *inode, schedule_work(&event->work); return; -lost_event: - fserror_free_event(event); lost: if (inode) pr_err_ratelimited("%s: lost file I/O error report for ino %lu=20 type %u pos 0x%llx len 0x%llx error %d", -- 2.43.0 On Saturday, 14 February 2026 at 13:48:38 UTC+5:30 syzbot wrote: syzbot has found a reproducer for the following issue on:=20 HEAD commit: cd7a5651db26 alpha: add missing address argument in call t..=20 git tree: upstream=20 console output: https://syzkaller.appspot.com/x/log.txt?x=3D13b47e5a580000=20 kernel config: https://syzkaller.appspot.com/x/.config?x=3De600149b13c010eb=20 dashboard link: https://syzkaller.appspot.com/bug?extid=3D5eb0d61dfb76ca126= 70c=20 compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian)=20 2.44=20 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=3D15df8722580000=20 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=3D17f362aa580000=20 Downloadable assets:=20 disk image:=20 https://storage.googleapis.com/syzbot-assets/ea46ed04f19d/disk-cd7a5651.raw= .xz=20 vmlinux:=20 https://storage.googleapis.com/syzbot-assets/ee7aa4ba7700/vmlinux-cd7a5651.= xz=20 kernel image:=20 https://storage.googleapis.com/syzbot-assets/70280d10edbe/bzImage-cd7a5651.= xz=20 mounted in repro:=20 https://storage.googleapis.com/syzbot-assets/41cb64e4f612/mount_0.gz=20 fsck result: failed (log:=20 https://syzkaller.appspot.com/x/fsck.log?x=3D1105a6e6580000)=20 IMPORTANT: if you fix the issue, please add the following tag to the=20 commit:=20 Reported-by: syzbot+5eb0d6...@syzkaller.appspotmail.com=20 I/O error, dev loop0, sector 512 op 0x0:(READ) flags 0x880700 phys_seg 1=20 prio class 2=20 I/O error, dev loop0, sector 18692 op 0x0:(READ) flags 0x880700 phys_seg 1=20 prio class 2=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=20 WARNING: inconsistent lock state=20 syzkaller #0 Not tainted=20 --------------------------------=20 inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.=20 ksoftirqd/0/15 [HC0[0]:SC1[1]:HE1:SE0] takes:=20 ffff888059619180 (&sb->s_type->i_lock_key#36){+.?.}-{3:3}, at: spin_lock=20 include/linux/spinlock.h:341 [inline]=20 ffff888059619180 (&sb->s_type->i_lock_key#36){+.?.}-{3:3}, at:=20 igrab+0x2a/0x230 fs/inode.c:1583=20 {SOFTIRQ-ON-W} state was registered at:=20 lock_acquire kernel/locking/lockdep.c:5868 [inline]=20 lock_acquire+0x17c/0x330 kernel/locking/lockdep.c:5825=20 __raw_spin_lock include/linux/spinlock_api_smp.h:158 [inline]=20 _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154=20 spin_lock include/linux/spinlock.h:341 [inline]=20 unlock_new_inode+0x7a/0x330 fs/inode.c:1222=20 xfs_finish_inode_setup fs/xfs/xfs_inode.h:630 [inline]=20 xfs_setup_existing_inode fs/xfs/xfs_inode.h:637 [inline]=20 xfs_iget+0x1196/0x30f0 fs/xfs/xfs_icache.c:814=20 xfs_mountfs+0x108c/0x20b0 fs/xfs/xfs_mount.c:1072=20 xfs_fs_fill_super+0x153f/0x1f20 fs/xfs/xfs_super.c:1938=20 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1694=20 vfs_get_tree+0x92/0x320 fs/super.c:1754=20 fc_mount fs/namespace.c:1193 [inline]=20 do_new_mount_fc fs/namespace.c:3760 [inline]=20 do_new_mount fs/namespace.c:3836 [inline]=20 path_mount+0x7d0/0x23d0 fs/namespace.c:4146=20 do_mount fs/namespace.c:4159 [inline]=20 __do_sys_mount fs/namespace.c:4348 [inline]=20 __se_sys_mount fs/namespace.c:4325 [inline]=20 __x64_sys_mount+0x293/0x310 fs/namespace.c:4325=20 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]=20 do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94=20 entry_SYSCALL_64_after_hwframe+0x77/0x7f=20 irq event stamp: 972992=20 hardirqs last enabled at (972992): []=20 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:178 [inline]=20 hardirqs last enabled at (972992): []=20 _raw_spin_unlock_irqrestore+0x52/0x80 kernel/locking/spinlock.c:194=20 hardirqs last disabled at (972991): []=20 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:130 [inline]=20 hardirqs last disabled at (972991): []=20 _raw_spin_lock_irqsave+0x52/0x60 kernel/locking/spinlock.c:162=20 softirqs last enabled at (972968): [] run_ksoftirqd=20 kernel/softirq.c:1063 [inline]=20 softirqs last enabled at (972968): []=20 run_ksoftirqd+0x38/0x60 kernel/softirq.c:1055=20 softirqs last disabled at (972973): [] run_ksoftirqd=20 kernel/softirq.c:1063 [inline]=20 softirqs last disabled at (972973): []=20 run_ksoftirqd+0x38/0x60 kernel/softirq.c:1055=20 other info that might help us debug this:=20 Possible unsafe locking scenario:=20 CPU0=20 ----=20 lock(&sb->s_type->i_lock_key#36);=20 =20 lock(&sb->s_type->i_lock_key#36);=20 *** DEADLOCK ***=20 no locks held by ksoftirqd/0/15.=20 stack backtrace:=20 CPU: 0 UID: 0 PID: 15 Comm: ksoftirqd/0 Not tainted syzkaller #0=20 PREEMPT(full)=20 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS=20 Google 02/12/2026=20 Call Trace:=20 =20 __dump_stack lib/dump_stack.c:94 [inline]=20 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120=20 print_usage_bug.part.0+0x257/0x340 kernel/locking/lockdep.c:4042=20 print_usage_bug kernel/locking/lockdep.c:4010 [inline]=20 valid_state kernel/locking/lockdep.c:4056 [inline]=20 mark_lock_irq kernel/locking/lockdep.c:4267 [inline]=20 mark_lock+0x74a/0xa20 kernel/locking/lockdep.c:4753=20 mark_usage kernel/locking/lockdep.c:4642 [inline]=20 __lock_acquire+0x103a/0x2630 kernel/locking/lockdep.c:5191=20 lock_acquire kernel/locking/lockdep.c:5868 [inline]=20 lock_acquire+0x17c/0x330 kernel/locking/lockdep.c:5825=20 __raw_spin_lock include/linux/spinlock_api_smp.h:158 [inline]=20 _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154=20 spin_lock include/linux/spinlock.h:341 [inline]=20 igrab+0x2a/0x230 fs/inode.c:1583=20 fserror_report+0x3fd/0x750 fs/fserror.c:159=20 fserror_report_io include/linux/fserror.h:48 [inline]=20 iomap_finish_folio_read+0x168/0x2c0 fs/iomap/buffered-io.c:407=20 iomap_read_end_io+0x11a/0x430 fs/iomap/bio.c:17=20 bio_endio+0x755/0x8b0 block/bio.c:1790=20 blk_update_request+0x741/0x1330 block/blk-mq.c:1016=20 blk_mq_end_request+0x5b/0x420 block/blk-mq.c:1178=20 lo_complete_rq+0x1d4/0x2a0 drivers/block/loop.c:314=20 blk_complete_reqs+0xb1/0xf0 block/blk-mq.c:1253=20 handle_softirqs+0x1ea/0x910 kernel/softirq.c:622=20 run_ksoftirqd kernel/softirq.c:1063 [inline]=20 run_ksoftirqd+0x38/0x60 kernel/softirq.c:1055=20 smpboot_thread_fn+0x3d3/0xaa0 kernel/smpboot.c:160=20 kthread+0x370/0x450 kernel/kthread.c:467=20 ret_from_fork+0x754/0xd80 arch/x86/kernel/process.c:158=20 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245=20 =20 ---=20 If you want syzbot to run the reproducer, reply with:=20 #syz test: git://repo/address.git branch-or-commit-hash=20 If you attach or paste a git patch, syzbot will apply it before testing.