1
0
Fork 0

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: syzbot+3031f712c7ad5dd4d926@syzkaller.appspotmail.com
Fixes: 8a23eb804c ("Make filldir[64]() verify the directory entry filename is valid")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
alistair/sunxi64-5.4-dsi
Linus Torvalds 2019-10-18 18:41:16 -04:00
parent 6b95cf9b8b
commit b9959c7a34
1 changed files with 2 additions and 2 deletions

View File

@ -105,9 +105,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;
}