]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Apr 2022 11:38:34 +0000 (13:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Apr 2022 11:38:34 +0000 (13:38 +0200)
added patches:
acpi-properties-consistently-return-enoent-if-there-are-no-more-references.patch
drbd-fix-potential-silent-data-corruption.patch

queue-4.14/acpi-properties-consistently-return-enoent-if-there-are-no-more-references.patch [new file with mode: 0644]
queue-4.14/drbd-fix-potential-silent-data-corruption.patch [new file with mode: 0644]
queue-4.14/series

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 (file)
index 0000000..8536829
--- /dev/null
@@ -0,0 +1,36 @@
+From babc92da5928f81af951663fc436997352e02d3a Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@linux.intel.com>
+Date: Fri, 14 Jan 2022 13:24:49 +0200
+Subject: ACPI: properties: Consistently return -ENOENT if there are no more references
+
+From: Sakari Ailus <sakari.ailus@linux.intel.com>
+
+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+ <stable@vger.kernel.org> # 4.14+
+Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..20299e6
--- /dev/null
@@ -0,0 +1,67 @@
+From f4329d1f848ac35757d9cc5487669d19dfc5979c Mon Sep 17 00:00:00 2001
+From: Lars Ellenberg <lars.ellenberg@linbit.com>
+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 <lars.ellenberg@linbit.com>
+
+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 <lars.ellenberg@linbit.com>
+Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
+Cc: <stable@vger.kernel.org> # 4.13.x
+Link: https://lore.kernel.org/r/20220330185551.3553196-1-christoph.boehmwalder@linbit.com
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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);
+ }
index 161d82ce975a19d8756bcb96d8dd97a30ced2607..89b179310c52fd1807bcb3b1ff048c7f79414c07 100644 (file)
@@ -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