From: Greg Kroah-Hartman Date: Mon, 5 Jul 2021 07:17:31 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v5.13.1~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e42773243430961944b52212ddd6c5a4c69743be;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: ext4-eliminate-bogus-error-in-ext4_data_block_valid_rcu.patch --- diff --git a/queue-4.19/ext4-eliminate-bogus-error-in-ext4_data_block_valid_rcu.patch b/queue-4.19/ext4-eliminate-bogus-error-in-ext4_data_block_valid_rcu.patch new file mode 100644 index 00000000000..5cb21745e91 --- /dev/null +++ b/queue-4.19/ext4-eliminate-bogus-error-in-ext4_data_block_valid_rcu.patch @@ -0,0 +1,46 @@ +From trdgn@amazon.com Mon Jul 5 09:04:15 2021 +From: Tahsin Erdogan +Date: Sat, 3 Jul 2021 16:05:55 -0700 +Subject: ext4: eliminate bogus error in ext4_data_block_valid_rcu() +To: Jan Kara , Greg Kroah-Hartman +Cc: Tahsin Erdogan , , Theodore Ts'o , Andreas Dilger , , +Message-ID: <20210703230555.4093-1-trdgn@amazon.com> + +From: Tahsin Erdogan + +Mainline commit ce9f24cccdc0 ("ext4: check journal inode extents more carefully") +enabled validity checks for journal inode's data blocks. This change got +ported to stable branches, but the backport for 4.19 has a bug where it will +flag an error even when system block entry's inode number matches journal +inode. + +The way error is reported is also problematic because it updates the superblock +without following journaling rules. This may result in superblock checksum +errors if the superblock is in the process of being committed but has a +previously calculated checksum that doesn't include the bogus error update. + +This patch eliminates the bogus error by trying to match how other backports +were implemented, which is to flag an error only when inode numbers mismatch. + +Fixes: commit a75a5d163857 ("ext4: check journal inode extents more carefully") +Signed-off-by: Tahsin Erdogan +Cc: Jan Kara +Signed-off-by: Greg Kroah-Hartman +--- + fs/ext4/block_validity.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/fs/ext4/block_validity.c ++++ b/fs/ext4/block_validity.c +@@ -171,8 +171,10 @@ static int ext4_data_block_valid_rcu(str + else if (start_blk >= (entry->start_blk + entry->count)) + n = n->rb_right; + else { ++ if (entry->ino == ino) ++ return 1; + sbi->s_es->s_last_error_block = cpu_to_le64(start_blk); +- return entry->ino == ino; ++ return 0; + } + } + return 1; diff --git a/queue-4.19/series b/queue-4.19/series index 4e69d71c51d..302d10a3894 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -21,3 +21,4 @@ mm-thp-another-pvmw_sync-fix-in-page_vma_mapped_walk.patch mm-futex-fix-shared-futex-pgoff-on-shmem-huge-page.patch scsi-sr-return-appropriate-error-code-when-disk-is-e.patch drm-nouveau-fix-dma_address-check-for-cpu-gpu-sync.patch +ext4-eliminate-bogus-error-in-ext4_data_block_valid_rcu.patch diff --git a/queue-5.10/series b/queue-5.10/series index 8fd302492df..efc2b3f6de7 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -2,3 +2,5 @@ scsi-sr-return-appropriate-error-code-when-disk-is-e.patch gpio-mxc-fix-disabled-interrupt-wake-up-support.patch drm-nouveau-fix-dma_address-check-for-cpu-gpu-sync.patch gpio-amd8111-and-tqmx86-require-has_ioport_map.patch +rdma-mlx5-block-fdb-rules-when-not-in-switchdev-mode.patch +revert-kvm-x86-mmu-drop-kvm_mmu_extended_role.cr4_la57-hack.patch diff --git a/queue-5.11/series b/queue-5.11/series new file mode 100644 index 00000000000..0e72ba3e34e --- /dev/null +++ b/queue-5.11/series @@ -0,0 +1 @@ +revert-kvm-x86-mmu-drop-kvm_mmu_extended_role.cr4_la57-hack.patch diff --git a/queue-5.13/series b/queue-5.13/series new file mode 100644 index 00000000000..0e72ba3e34e --- /dev/null +++ b/queue-5.13/series @@ -0,0 +1 @@ +revert-kvm-x86-mmu-drop-kvm_mmu_extended_role.cr4_la57-hack.patch diff --git a/queue-5.4/series b/queue-5.4/series index 155220448df..ee6886069d3 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -2,3 +2,4 @@ x86-efi-remove-unused-variables.patch scsi-sr-return-appropriate-error-code-when-disk-is-e.patch drm-nouveau-fix-dma_address-check-for-cpu-gpu-sync.patch gpio-amd8111-and-tqmx86-require-has_ioport_map.patch +rdma-mlx5-block-fdb-rules-when-not-in-switchdev-mode.patch