diff --git a/patches.kernel.org/6.3.3-235-ext4-bail-out-of-ext4_xattr_ibody_get-fails-for.patch b/patches.kernel.org/6.3.3-235-ext4-bail-out-of-ext4_xattr_ibody_get-fails-for.patch new file mode 100644 index 0000000..acaf530 --- /dev/null +++ b/patches.kernel.org/6.3.3-235-ext4-bail-out-of-ext4_xattr_ibody_get-fails-for.patch @@ -0,0 +1,37 @@ +From: Theodore Ts'o +Date: Fri, 12 May 2023 15:16:27 -0400 +Subject: [PATCH] ext4: bail out of ext4_xattr_ibody_get() fails for any reason +References: bsc#1012628 +Patch-mainline: 6.3.3 +Git-commit: 2a534e1d0d1591e951f9ece2fb460b2ff92edabd + +commit 2a534e1d0d1591e951f9ece2fb460b2ff92edabd upstream. + +In ext4_update_inline_data(), if ext4_xattr_ibody_get() fails for any +reason, it's best if we just fail as opposed to stumbling on, +especially if the failure is EFSCORRUPTED. + +Cc: stable@kernel.org +Signed-off-by: Theodore Ts'o +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Jiri Slaby +--- + fs/ext4/inline.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c +index db1ca23d..cb36037f 100644 +--- a/fs/ext4/inline.c ++++ b/fs/ext4/inline.c +@@ -360,7 +360,7 @@ static int ext4_update_inline_data(handle_t *handle, struct inode *inode, + + error = ext4_xattr_ibody_get(inode, i.name_index, i.name, + value, len); +- if (error == -ENODATA) ++ if (error < 0) + goto out; + + BUFFER_TRACE(is.iloc.bh, "get_write_access"); +-- +2.35.3 + diff --git a/series.conf b/series.conf index f18f94d..9b6dbb6 100644 --- a/series.conf +++ b/series.conf @@ -968,6 +968,7 @@ patches.kernel.org/6.3.3-232-ext4-improve-error-handling-from-ext4_dirhash.patch patches.kernel.org/6.3.3-233-ext4-fix-deadlock-when-converting-an-inline-dir.patch patches.kernel.org/6.3.3-234-ext4-add-bounds-checking-in-get_max_inline_xatt.patch + patches.kernel.org/6.3.3-235-ext4-bail-out-of-ext4_xattr_ibody_get-fails-for.patch ######################################################## # Build fixes that apply to the vanilla kernel too.