public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Eugen Hristev <eugen.hristev@collabora.com>
To: tytso@mit.edu, adilger.kernel@dilger.ca,
	linux-ext4@vger.kernel.org, jaegeuk@kernel.org, chao@kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel@collabora.com,
	eugen.hristev@collabora.com, viro@zeniv.linux.org.uk,
	brauner@kernel.org, jack@suse.cz, krisman@suse.de,
	Gabriel Krisman Bertazi <krisman@collabora.com>
Subject: [PATCH v13 6/9] ext4: Log error when lookup of encoded dentry fails
Date: Tue,  5 Mar 2024 12:16:05 +0200	[thread overview]
Message-ID: <20240305101608.67943-7-eugen.hristev@collabora.com> (raw)
In-Reply-To: <20240305101608.67943-1-eugen.hristev@collabora.com>

From: Gabriel Krisman Bertazi <krisman@collabora.com>

If the volume is in strict mode, ext4_ci_compare can report a broken
encoding name.  This will not trigger on a bad lookup, which is caught
earlier, only if the actual disk name is bad.

Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
---
 fs/ext4/namei.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 2d0ee232fbe7..3268cf45d9db 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1477,6 +1477,9 @@ static bool ext4_match(struct inode *parent,
 			 * only case where it happens is on a disk
 			 * corruption or ENOMEM.
 			 */
+			if (ret == -EINVAL)
+				EXT4_ERROR_INODE(parent,
+					"Directory contains filename that is invalid UTF-8");
 			return false;
 		}
 		return ret;
-- 
2.34.1


  parent reply	other threads:[~2024-03-05 10:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05 10:15 [PATCH v13 0/9] Cache insensitive cleanup for ext4/f2fs Eugen Hristev
2024-03-05 10:16 ` [PATCH v13 1/9] ext4: Simplify the handling of cached insensitive names Eugen Hristev
2024-03-05 10:16 ` [PATCH v13 2/9] f2fs: " Eugen Hristev
2024-03-13 23:36   ` Gabriel Krisman Bertazi
2024-03-14  8:44     ` Eugen Hristev
2024-03-14 14:41       ` Gabriel Krisman Bertazi
2024-03-18  9:53         ` Eugen Hristev
2024-03-05 10:16 ` [PATCH v13 3/9] libfs: Introduce case-insensitive string comparison helper Eugen Hristev
2024-03-13 23:16   ` Gabriel Krisman Bertazi
2024-03-05 10:16 ` [PATCH v13 4/9] ext4: Reuse generic_ci_match for ci comparisons Eugen Hristev
2024-03-05 10:16 ` [PATCH v13 5/9] f2fs: " Eugen Hristev
2024-03-05 10:16 ` Eugen Hristev [this message]
2024-03-05 10:16 ` [PATCH v13 7/9] f2fs: Log error when lookup of encoded dentry fails Eugen Hristev
2024-03-05 10:16 ` [PATCH v13 8/9] ext4: Move CONFIG_UNICODE defguards into the code flow Eugen Hristev
2024-03-05 10:16 ` [PATCH v13 9/9] f2fs: " Eugen Hristev

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=20240305101608.67943-7-eugen.hristev@collabora.com \
    --to=eugen.hristev@collabora.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=brauner@kernel.org \
    --cc=chao@kernel.org \
    --cc=jack@suse.cz \
    --cc=jaegeuk@kernel.org \
    --cc=kernel@collabora.com \
    --cc=krisman@collabora.com \
    --cc=krisman@suse.de \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    /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