Re: [syzbot] [overlayfs?] WARNING in shmem_unlink

From: Hillf Danton
Date: Sat Aug 16 2025 - 01:42:49 EST


> Date: Fri, 15 Aug 2025 20:08:33 -0700 [thread overview]
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 0cc53520e68b Merge tag 'probes-fixes-v6.17-rc1' of git://g..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=14a003a2580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=13f39c6a0380a209
> dashboard link: https://syzkaller.appspot.com/bug?extid=ec9fab8b7f0386b98a17
> compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1387bc34580000

#syz test

--- x/fs/overlayfs/super.c
+++ y/fs/overlayfs/super.c
@@ -695,7 +695,7 @@ static int ovl_make_workdir(struct super
tmpfile = ovl_do_tmpfile(ofs, ofs->workdir, S_IFREG | 0);
ofs->tmpfile = !IS_ERR(tmpfile);
if (ofs->tmpfile)
- fput(tmpfile);
+ ;
else
pr_warn("upper fs does not support tmpfile.\n");

@@ -790,6 +790,8 @@ static int ovl_make_workdir(struct super
}
out:
mnt_drop_write(mnt);
+ if (ofs->tmpfile)
+ fput(tmpfile);
return err;
}

--