Skip to content

Commit b9959c7

Browse files
committed
filldir[64]: remove WARN_ON_ONCE() for bad directory entries
This was always meant to be a temporary thing, just for testing and to see if it actually ever triggered. The only thing that reported it was syzbot doing disk image fuzzing, and then that warning is expected. So let's just remove it before -rc4, because the extra sanity testing should probably go to -stable, but we don't want the warning to do so. Reported-by: [email protected] Fixes: 8a23eb8 ("Make filldir[64]() verify the directory entry filename is valid") Signed-off-by: Linus Torvalds <[email protected]>
1 parent 6b95cf9 commit b9959c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/readdir.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ EXPORT_SYMBOL(iterate_dir);
105105
*/
106106
static int verify_dirent_name(const char *name, int len)
107107
{
108-
if (WARN_ON_ONCE(!len))
108+
if (!len)
109109
return -EIO;
110-
if (WARN_ON_ONCE(memchr(name, '/', len)))
110+
if (memchr(name, '/', len))
111111
return -EIO;
112112
return 0;
113113
}

0 commit comments

Comments
 (0)