mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Siddharth Chandrasekaran <csiddharth@vmware.com>
To: torvalds@linux-foundation.org
Cc: gregkh@linuxfoundation.org, sashal@kernel.org, jannh@google.com,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	siddharth@embedjournal.com,
	Siddharth Chandrasekaran <csiddharth@vmware.com>
Subject: [PATCH 4.19 2/2] filldir[64]: remove WARN_ON_ONCE() for bad directory entries
Date: Tue, 24 Dec 2019 01:06:30 +0530	[thread overview]
Message-ID: <7f71c415d45ab489c2377e07ac80062ca7db5335.1577128883.git.csiddharth@vmware.com> (raw)
In-Reply-To: <cover.1577128778.git.csiddharth@vmware.com>
In-Reply-To: <cover.1577128883.git.csiddharth@vmware.com>

From: Linus Torvalds <torvalds@linux-foundation.org>

[ Upstream commit b9959c7a347d6adbb558fba7e36e9fef3cba3b07 ]

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>
---
 fs/readdir.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/readdir.c b/fs/readdir.c
index ace19d9..1059f2a 100644
--- a/fs/readdir.c
+++ b/fs/readdir.c
@@ -90,9 +90,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;
 }
-- 
2.7.4


  parent reply	other threads:[~2019-12-23 19:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-23 19:36 [PATCH 4.14 0/2] Backport readdir sanity checking patches Siddharth Chandrasekaran
2019-12-23 19:36 ` [PATCH 4.14 1/2] Make filldir[64]() verify the directory entry filename is valid Siddharth Chandrasekaran
2019-12-23 19:36 ` [PATCH 4.14 2/2] filldir[64]: remove WARN_ON_ONCE() for bad directory entries Siddharth Chandrasekaran
2019-12-23 19:36 ` [PATCH 4.19 0/2] Backport readdir sanity checking patches Siddharth Chandrasekaran
2019-12-23 19:36   ` [PATCH 4.19 1/2] Make filldir[64]() verify the directory entry filename is valid Siddharth Chandrasekaran
2019-12-23 19:36   ` Siddharth Chandrasekaran [this message]
2019-12-23 19:36 ` [PATCH 4.4 0/2] Backport readdir sanity checking patches Siddharth Chandrasekaran
2019-12-23 19:36   ` [PATCH 4.4 1/2] Make filldir[64]() verify the directory entry filename is valid Siddharth Chandrasekaran
2019-12-23 19:36   ` [PATCH 4.4 2/2] filldir[64]: remove WARN_ON_ONCE() for bad directory entries Siddharth Chandrasekaran
2020-01-07 22:09   ` [PATCH 4.4 0/2] Backport readdir sanity checking patches Ben Hutchings
2019-12-23 19:36 ` [PATCH 4.9 " Siddharth Chandrasekaran
2019-12-23 19:36   ` [PATCH 4.9 1/2] Make filldir[64]() verify the directory entry filename is valid Siddharth Chandrasekaran
2019-12-23 19:36   ` [PATCH 4.9 2/2] filldir[64]: remove WARN_ON_ONCE() for bad directory entries Siddharth Chandrasekaran
2020-01-01 17:00 ` [PATCH 4.14 0/2] Backport readdir sanity checking patches Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7f71c415d45ab489c2377e07ac80062ca7db5335.1577128883.git.csiddharth@vmware.com \
    --to=csiddharth@vmware.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jannh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sashal@kernel.org \
    --cc=siddharth@embedjournal.com \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®