Re: [syzbot] [ext4?] INFO: task hung in filename_rmdir

From: Qing Wang

Date: Sat Feb 28 2026 - 04:45:33 EST


On Sat, 28 Feb 2026 at 16:29, Qing Wang <wangqing7171@xxxxxxxxx> wrote:
> #syz test
>
> diff --git a/fs/namei.c b/fs/namei.c
> index 58f715f7657e..34a5d49b038b 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -5383,7 +5383,7 @@ int filename_rmdir(int dfd, struct filename *name)
> if (error)
> goto exit2;
>
> - dentry = start_dirop(path.dentry, &last, lookup_flags);
> + dentry = __start_dirop(path.dentry, &last, lookup_flags, TASK_KILLABLE);
> error = PTR_ERR(dentry);
> if (IS_ERR(dentry))
> goto exit3;

Using interruptible locks [0] did not resolve the issue and it only improved
reliability.
[0] __start_dirop(..., TASK_KILLABLE) -> down_write_killable_nested()

The root cause of this hung task may be a deadlock, and I've found a recent
patchset [1] that may be related. Further analysis of this patch would be
helpful.
[1] ff7c4ea11a05 - VFS: add start_creating_killable() and start_removing_killable()
4037d966f034 - VFS: introduce start_dirop() and end_dirop()
5c8752729970 - VFS/nfsd/ovl: introduce start_renaming() and end_renaming()
ac50950ca143 - VFS/ovl/smb: introduce start_renaming_dentry()
833d2b3a072f - Add start_renaming_two_dentries()

--
Qing