From: Greg Kroah-Hartman Date: Sat, 2 Apr 2022 11:38:34 +0000 (+0200) Subject: 4.14-stable patches X-Git-Tag: v5.17.2~192 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=69d9191cd64303dcc2ec084bb2dc083409f11779;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: acpi-properties-consistently-return-enoent-if-there-are-no-more-references.patch drbd-fix-potential-silent-data-corruption.patch --- diff --git a/queue-4.14/acpi-properties-consistently-return-enoent-if-there-are-no-more-references.patch b/queue-4.14/acpi-properties-consistently-return-enoent-if-there-are-no-more-references.patch new file mode 100644 index 00000000000..8536829a0f9 --- /dev/null +++ b/queue-4.14/acpi-properties-consistently-return-enoent-if-there-are-no-more-references.patch @@ -0,0 +1,36 @@ +From babc92da5928f81af951663fc436997352e02d3a Mon Sep 17 00:00:00 2001 +From: Sakari Ailus +Date: Fri, 14 Jan 2022 13:24:49 +0200 +Subject: ACPI: properties: Consistently return -ENOENT if there are no more references + +From: Sakari Ailus + +commit babc92da5928f81af951663fc436997352e02d3a upstream. + +__acpi_node_get_property_reference() is documented to return -ENOENT if +the caller requests a property reference at an index that does not exist, +not -EINVAL which it actually does. + +Fix this by returning -ENOENT consistenly, independently of whether the +property value is a plain reference or a package. + +Fixes: c343bc2ce2c6 ("ACPI: properties: Align return codes of __acpi_node_get_property_reference()") +Cc: 4.14+ # 4.14+ +Signed-off-by: Sakari Ailus +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman +--- + drivers/acpi/property.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/acpi/property.c ++++ b/drivers/acpi/property.c +@@ -601,7 +601,7 @@ int __acpi_node_get_property_reference(c + */ + if (obj->type == ACPI_TYPE_LOCAL_REFERENCE) { + if (index) +- return -EINVAL; ++ return -ENOENT; + + ret = acpi_bus_get_device(obj->reference.handle, &device); + if (ret) diff --git a/queue-4.14/drbd-fix-potential-silent-data-corruption.patch b/queue-4.14/drbd-fix-potential-silent-data-corruption.patch new file mode 100644 index 00000000000..20299e6c70f --- /dev/null +++ b/queue-4.14/drbd-fix-potential-silent-data-corruption.patch @@ -0,0 +1,67 @@ +From f4329d1f848ac35757d9cc5487669d19dfc5979c Mon Sep 17 00:00:00 2001 +From: Lars Ellenberg +Date: Wed, 30 Mar 2022 20:55:51 +0200 +Subject: drbd: fix potential silent data corruption +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Lars Ellenberg + +commit f4329d1f848ac35757d9cc5487669d19dfc5979c upstream. + +Scenario: +--------- + +bio chain generated by blk_queue_split(). +Some split bio fails and propagates its error status to the "parent" bio. +But then the (last part of the) parent bio itself completes without error. + +We would clobber the already recorded error status with BLK_STS_OK, +causing silent data corruption. + +Reproducer: +----------- + +How to trigger this in the real world within seconds: + +DRBD on top of degraded parity raid, +small stripe_cache_size, large read_ahead setting. +Drop page cache (sysctl vm.drop_caches=1, fadvise "DONTNEED", +umount and mount again, "reboot"). + +Cause significant read ahead. + +Large read ahead request is split by blk_queue_split(). +Parts of the read ahead that are already in the stripe cache, +or find an available stripe cache to use, can be serviced. +Parts of the read ahead that would need "too much work", +would need to wait for a "stripe_head" to become available, +are rejected immediately. + +For larger read ahead requests that are split in many pieces, it is very +likely that some "splits" will be serviced, but then the stripe cache is +exhausted/busy, and the remaining ones will be rejected. + +Signed-off-by: Lars Ellenberg +Signed-off-by: Christoph Böhmwalder +Cc: # 4.13.x +Link: https://lore.kernel.org/r/20220330185551.3553196-1-christoph.boehmwalder@linbit.com +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman +--- + drivers/block/drbd/drbd_req.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/block/drbd/drbd_req.c ++++ b/drivers/block/drbd/drbd_req.c +@@ -207,7 +207,8 @@ void start_new_tl_epoch(struct drbd_conn + void complete_master_bio(struct drbd_device *device, + struct bio_and_error *m) + { +- m->bio->bi_status = errno_to_blk_status(m->error); ++ if (unlikely(m->error)) ++ m->bio->bi_status = errno_to_blk_status(m->error); + bio_endio(m->bio); + dec_ap_bio(device); + } diff --git a/queue-4.14/series b/queue-4.14/series index 161d82ce975..89b179310c5 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -34,3 +34,5 @@ qed-display-vf-trust-config.patch qed-validate-and-restrict-untrusted-vfs-vlan-promisc-mode.patch revert-input-clear-btn_right-middle-on-buttonpads.patch alsa-cs4236-fix-an-incorrect-null-check-on-list-iterator.patch +drbd-fix-potential-silent-data-corruption.patch +acpi-properties-consistently-return-enoent-if-there-are-no-more-references.patch