linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Mateusz Guzik <mjguzik@gmail.com>
Cc: neil@brown.name, agruenba@redhat.com,
	 almaz.alexandrovich@paragon-software.com, dhowells@redhat.com,
	gfs2@lists.linux.dev, jack@suse.cz,
	 linux-afs@lists.infradead.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org,  marc.dionne@auristor.com,
	ntfs3@lists.linux.dev, syzkaller-bugs@googlegroups.com,
	 viro@zeniv.linux.org.uk,
	syzbot+2fefb910d2c20c0698d8@syzkaller.appspotmail.com
Subject: Re: [syzbot] [ntfs3?] INFO: task hung in __start_renaming
Date: Tue, 25 Nov 2025 10:35:13 +0100	[thread overview]
Message-ID: <20251125-hausdach-antrag-f3e4bcd35365@brauner> (raw)
In-Reply-To: <c2kpawomkbvtahjm7y5mposbhckb7wxthi3iqy5yr22ggpucrm@ufvxwy233qxo>

On Mon, Nov 24, 2025 at 10:21:07AM +0100, Mateusz Guzik wrote:
> On Mon, Nov 24, 2025 at 10:01:53AM +0100, Mateusz Guzik wrote:
> > sigh, so it *is* my patch, based on syzbot testing specifically on
> > directory locking vs inode branches, but I don't see why.
> > 
> > I take it the open() codepath took the rwsem, hence the rename is
> > sleeping. Given that all reproducers find it *on* cpu, it may be this
> > is busy looping for some reason.
> > 
> > I don't have time to dig more into it right now, so I think it would
> > be best to *drop* my patch for the time being. Once I figure it out
> > I'll send a v2.
> > 
> 
> good news, now that I gave up I found it.
> 
> insert_inode_locked() is looping indefinitely an inode which is no
> longer I_NEW or I_CREATING.
> 
> In stock kernel:
>                 if (unlikely(!inode_unhashed(old))) {
>                         iput(old);
>                         return -EBUSY;
>                 }
>                 iput(old);
> 
> it returns an error
> 
> with my patch:
>                if (isnew) {
>                         wait_on_new_inode(old);
>                         if (unlikely(!inode_unhashed(old))) {
>                                 iput(old);
>                                 return -EBUSY;
>                         }
>                 }
>                 iput(old);
> 
> unhashed status is only ever check if I_NEW was spotted,
> 
> which can be false. Afterwards the routine is stuck in endless cycle of
> finding the inode and iputting it.
> 
> Christian, I think the easiest way out is to add the fix I initially
> posted, inlined below. It *was* successfuly tested by syzbot. It retains
> inode_unhashed checks even when they are not necessary to avoid any more
> surprises.

Thanks for tracking this down. Now folded.

  reply	other threads:[~2025-11-25  9:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-23 22:44 [syzbot] [ntfs3?] INFO: task hung in __start_renaming syzbot
2025-11-23 23:29 ` Mateusz Guzik
2025-11-23 23:30   ` Mateusz Guzik
2025-11-24  0:27 ` Mateusz Guzik
2025-11-24  0:57   ` syzbot
2025-11-24  3:29 ` Mateusz Guzik
2025-11-24  4:47   ` syzbot
2025-11-24  6:28 ` Mateusz Guzik
2025-11-24  7:13   ` syzbot
2025-11-24  7:54     ` Mateusz Guzik
2025-11-24  9:01       ` Mateusz Guzik
2025-11-24  9:21         ` Mateusz Guzik
2025-11-25  9:35           ` Christian Brauner [this message]
2025-11-24  8:07 ` Mateusz Guzik
2025-11-24  8:38   ` syzbot
2025-11-24  8:08 ` Mateusz Guzik
2025-11-24  8:57   ` 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=20251125-hausdach-antrag-f3e4bcd35365@brauner \
    --to=brauner@kernel.org \
    --cc=agruenba@redhat.com \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=dhowells@redhat.com \
    --cc=gfs2@lists.linux.dev \
    --cc=jack@suse.cz \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.dionne@auristor.com \
    --cc=mjguzik@gmail.com \
    --cc=neil@brown.name \
    --cc=ntfs3@lists.linux.dev \
    --cc=syzbot+2fefb910d2c20c0698d8@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).