Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 8a23eb804ca4 ("Make filldir[64]() verify the directory entry filename is valid")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+2 -2
+2 -2
fs/readdir.c
··· 105 105 */ 106 106 static int verify_dirent_name(const char *name, int len) 107 107 { 108 - if (WARN_ON_ONCE(!len)) 108 + if (!len) 109 109 return -EIO; 110 - if (WARN_ON_ONCE(memchr(name, '/', len))) 110 + if (memchr(name, '/', len)) 111 111 return -EIO; 112 112 return 0; 113 113 }