-From stable+bounces-201041-greg=kroah.com@vger.kernel.org Mon Dec 15 14:40:38 2025
-From: Ankan Biswas <spyjetfayed@gmail.com>
-Date: Mon, 15 Dec 2025 19:09:57 +0530
+From stable+bounces-206361-greg=kroah.com@vger.kernel.org Thu Jan 8 16:07:09 2026
+From: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
+Date: Thu, 8 Jan 2026 12:03:50 -0300
Subject: ext4: fix error message when rejecting the default hash
To: stable@vger.kernel.org
-Cc: gregkh@linuxfoundation.org, sashal@kernel.org, tytso@mit.edu, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, khalid@kernel.org, david.hunter.linux@gmail.com, linux-kernel-mentees@vger.kernel.org, Gabriel Krisman Bertazi <krisman@suse.de>, Ankan Biswas <spyjetfayed@gmail.com>
-Message-ID: <20251215133957.4236-1-spyjetfayed@gmail.com>
+Cc: Gabriel Krisman Bertazi <krisman@suse.de>, Theodore Ts'o <tytso@mit.edu>, Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
+Message-ID: <20260108150350.3354622-2-cascardo@igalia.com>
From: Gabriel Krisman Bertazi <krisman@suse.de>
-[ Upstream commit a2187431c395cdfbf144e3536f25468c64fc7cfa ]
+commit a2187431c395cdfbf144e3536f25468c64fc7cfa upstream.
Commit 985b67cd8639 ("ext4: filesystems without casefold feature cannot
be mounted with siphash") properly rejects volumes where
Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
Link: https://patch.msgid.link/87jzg1en6j.fsf_-_@mailhost.krisman.be
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-[ The commit a2187431c395 intended to remove the if-block which was used
- for an old SIPHASH rejection check. ]
-Signed-off-by: Ankan Biswas <spyjetfayed@gmail.com>
+Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/ext4/ext4.h | 1 +
- fs/ext4/super.c | 20 +++++++++++++++++---
- 2 files changed, 18 insertions(+), 3 deletions(-)
+ fs/ext4/super.c | 28 +++++++++++++++++-----------
+ 2 files changed, 18 insertions(+), 11 deletions(-)
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
const void *address, unsigned int length)
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
-@@ -5140,16 +5140,27 @@ out:
+@@ -3632,14 +3632,6 @@ int ext4_feature_set_ok(struct super_blo
+ }
+ #endif
+
+- if (EXT4_SB(sb)->s_es->s_def_hash_version == DX_HASH_SIPHASH &&
+- !ext4_has_feature_casefold(sb)) {
+- ext4_msg(sb, KERN_ERR,
+- "Filesystem without casefold feature cannot be "
+- "mounted with siphash");
+- return 0;
+- }
+-
+ if (readonly)
+ return 1;
+
+@@ -5148,16 +5140,27 @@ out:
return ret;
}
if (ext4_has_feature_dir_index(sb)) {
i = le32_to_cpu(es->s_flags);
if (i & EXT2_FLAGS_UNSIGNED_HASH)
-@@ -5167,6 +5178,7 @@ static void ext4_hash_info_init(struct s
+@@ -5175,6 +5178,7 @@ static void ext4_hash_info_init(struct s
#endif
}
}
}
static int ext4_block_group_meta_init(struct super_block *sb, int silent)
-@@ -5311,7 +5323,9 @@ static int __ext4_fill_super(struct fs_c
+@@ -5319,7 +5323,9 @@ static int __ext4_fill_super(struct fs_c
if (err)
goto failed_mount;
drm-amd-display-fix-null-pointer-deref-in-dcn20_resource.c.patch
loongarch-refactor-register-restoration-in-ftrace_common_return.patch
powerpc-64s-radix-kfence-map-__kfence_pool-at-page-granularity.patch
-ext4-fix-error-message-when-rejecting-the-default-hash.patch
ext4-introduce-itail-helper.patch
ext4-fix-out-of-bound-read-in-ext4_xattr_inode_dec_ref_all.patch
xfrm-state-fix-out-of-bounds-read-during-lookup.patch
mm-damon-tests-core-kunit-handle-alloc-failure-on-damon_test_set_attrs.patch
mm-damon-tests-core-kunit-handle-alloc-failures-in-damon_test_update_monitoring_result.patch
virtio_console-fix-order-of-fields-cols-and-rows.patch
-ext4-filesystems-without-casefold-feature-cannot-be-mounted-with-siphash.patch
net-stmmac-make-sure-that-ptp_rate-is-not-0-before-configuring-est.patch
pwm-stm32-always-program-polarity.patch
blk-mq-setup-queue-tag_set-before-initializing-hctx.patch
tty-fix-tty_port_tty_-hangup-kernel-doc.patch
firmware-arm_scmi-fix-unused-notifier-block-in-unregister.patch
revert-iommu-amd-skip-enabling-command-event-buffers-for-kdump.patch
+ext4-filesystems-without-casefold-feature-cannot-be-mounted-with-siphash.patch
+ext4-fix-error-message-when-rejecting-the-default-hash.patch