Skip to content

Commit

Permalink
filldir[64]: remove WARN_ON_ONCE() for bad directory entries
Browse files Browse the repository at this point in the history
commit b9959c7a347d6adbb558fba7e36e9fef3cba3b07 upstream.

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: 8a23eb804ca4 ("Make filldir[64]() verify the directory entry filename is valid")
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
torvalds authored and gregkh committed Jan 4, 2020
1 parent cce8d88 commit 5d41a0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/readdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ EXPORT_SYMBOL(iterate_dir);
*/
static int verify_dirent_name(const char *name, int len)
{
if (WARN_ON_ONCE(!len))
if (!len)
return -EIO;
if (WARN_ON_ONCE(memchr(name, '/', len)))
if (memchr(name, '/', len))
return -EIO;
return 0;
}
Expand Down

0 comments on commit 5d41a0c

Please sign in to comment.