summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-10-18 18:41:16 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-04 13:34:37 +0100
commit5d41a0c34053b38a687087747f7d76494aa9f05c (patch)
tree9b88173d0dd3b1fa92903716958b5b9535037624 /fs
parentcce8d88a5a2735305198c23fa944737c2a1b3939 (diff)
downloadlinux-stable-5d41a0c34053b38a687087747f7d76494aa9f05c.tar.gz
linux-stable-5d41a0c34053b38a687087747f7d76494aa9f05c.tar.bz2
linux-stable-5d41a0c34053b38a687087747f7d76494aa9f05c.zip
filldir[64]: remove WARN_ON_ONCE() for bad directory entries
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: 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> Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/readdir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/readdir.c b/fs/readdir.c
index 4c6ffe3bdfc7..3494d7a8ff65 100644
--- a/fs/readdir.c
+++ b/fs/readdir.c
@@ -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;
}