]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jan 2022 11:37:34 +0000 (12:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jan 2022 11:37:34 +0000 (12:37 +0100)
added patches:
block-fix-fsync-always-failed-if-once-failed.patch
powerpc-cell-fix-clang-wimplicit-fallthrough-warning.patch
powerpc-fsl-dts-enable-wa-for-erratum-a-009885-on-fman3l-mdio-buses.patch

queue-5.10/block-fix-fsync-always-failed-if-once-failed.patch [new file with mode: 0644]
queue-5.10/powerpc-cell-fix-clang-wimplicit-fallthrough-warning.patch [new file with mode: 0644]
queue-5.10/powerpc-fsl-dts-enable-wa-for-erratum-a-009885-on-fman3l-mdio-buses.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/block-fix-fsync-always-failed-if-once-failed.patch b/queue-5.10/block-fix-fsync-always-failed-if-once-failed.patch
new file mode 100644 (file)
index 0000000..65d823c
--- /dev/null
@@ -0,0 +1,62 @@
+From 8a7518931baa8ea023700987f3db31cb0a80610b Mon Sep 17 00:00:00 2001
+From: Ye Bin <yebin10@huawei.com>
+Date: Mon, 29 Nov 2021 09:26:59 +0800
+Subject: block: Fix fsync always failed if once failed
+
+From: Ye Bin <yebin10@huawei.com>
+
+commit 8a7518931baa8ea023700987f3db31cb0a80610b upstream.
+
+We do test with inject error fault base on v4.19, after test some time we found
+sync /dev/sda always failed.
+[root@localhost] sync /dev/sda
+sync: error syncing '/dev/sda': Input/output error
+
+scsi log as follows:
+[19069.812296] sd 0:0:0:0: [sda] tag#64 Send: scmd 0x00000000d03a0b6b
+[19069.812302] sd 0:0:0:0: [sda] tag#64 CDB: Synchronize Cache(10) 35 00 00 00 00 00 00 00 00 00
+[19069.812533] sd 0:0:0:0: [sda] tag#64 Done: SUCCESS Result: hostbyte=DID_OK driverbyte=DRIVER_OK
+[19069.812536] sd 0:0:0:0: [sda] tag#64 CDB: Synchronize Cache(10) 35 00 00 00 00 00 00 00 00 00
+[19069.812539] sd 0:0:0:0: [sda] tag#64 scsi host busy 1 failed 0
+[19069.812542] sd 0:0:0:0: Notifying upper driver of completion (result 0)
+[19069.812546] sd 0:0:0:0: [sda] tag#64 sd_done: completed 0 of 0 bytes
+[19069.812549] sd 0:0:0:0: [sda] tag#64 0 sectors total, 0 bytes done.
+[19069.812564] print_req_error: I/O error, dev sda, sector 0
+
+ftrace log as follows:
+ rep-306069 [007] .... 19654.923315: block_bio_queue: 8,0 FWS 0 + 0 [rep]
+ rep-306069 [007] .... 19654.923333: block_getrq: 8,0 FWS 0 + 0 [rep]
+ kworker/7:1H-250   [007] .... 19654.923352: block_rq_issue: 8,0 FF 0 () 0 + 0 [kworker/7:1H]
+ <idle>-0     [007] ..s. 19654.923562: block_rq_complete: 8,0 FF () 18446744073709551615 + 0 [0]
+ <idle>-0     [007] d.s. 19654.923576: block_rq_complete: 8,0 WS () 0 + 0 [-5]
+
+As 8d6996630c03 introduce 'fq->rq_status', this data only update when 'flush_rq'
+reference count isn't zero. If flush request once failed and record error code
+in 'fq->rq_status'. If there is no chance to update 'fq->rq_status',then do fsync
+will always failed.
+To address this issue reset 'fq->rq_status' after return error code to upper layer.
+
+Fixes: 8d6996630c03("block: fix null pointer dereference in blk_mq_rq_timed_out()")
+Signed-off-by: Ye Bin <yebin10@huawei.com>
+Reviewed-by: Ming Lei <ming.lei@redhat.com>
+Link: https://lore.kernel.org/r/20211129012659.1553733-1-yebin10@huawei.com
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ block/blk-flush.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/block/blk-flush.c
++++ b/block/blk-flush.c
+@@ -236,8 +236,10 @@ static void flush_end_io(struct request
+        * avoiding use-after-free.
+        */
+       WRITE_ONCE(flush_rq->state, MQ_RQ_IDLE);
+-      if (fq->rq_status != BLK_STS_OK)
++      if (fq->rq_status != BLK_STS_OK) {
+               error = fq->rq_status;
++              fq->rq_status = BLK_STS_OK;
++      }
+       if (!q->elevator) {
+               flush_rq->tag = BLK_MQ_NO_TAG;
diff --git a/queue-5.10/powerpc-cell-fix-clang-wimplicit-fallthrough-warning.patch b/queue-5.10/powerpc-cell-fix-clang-wimplicit-fallthrough-warning.patch
new file mode 100644 (file)
index 0000000..416f850
--- /dev/null
@@ -0,0 +1,47 @@
+From e89257e28e844f5d1d39081bb901d9f1183a7705 Mon Sep 17 00:00:00 2001
+From: Anders Roxell <anders.roxell@linaro.org>
+Date: Tue, 7 Dec 2021 12:02:28 +0100
+Subject: powerpc/cell: Fix clang -Wimplicit-fallthrough warning
+
+From: Anders Roxell <anders.roxell@linaro.org>
+
+commit e89257e28e844f5d1d39081bb901d9f1183a7705 upstream.
+
+Clang warns:
+
+arch/powerpc/platforms/cell/pervasive.c:81:2: error: unannotated fall-through between switch labels
+        case SRR1_WAKEEE:
+        ^
+arch/powerpc/platforms/cell/pervasive.c:81:2: note: insert 'break;' to avoid fall-through
+        case SRR1_WAKEEE:
+        ^
+        break;
+1 error generated.
+
+Clang is more pedantic than GCC, which does not warn when failing
+through to a case that is just break or return. Clang's version is more
+in line with the kernel's own stance in deprecated.rst. Add athe missing
+break to silence the warning.
+
+Fixes: 6e83985b0f6e ("powerpc/cbe: Do not process external or decremeter interrupts from sreset")
+Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
+Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
+Reviewed-by: Nathan Chancellor <nathan@kernel.org>
+Reviewed-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/20211207110228.698956-1-anders.roxell@linaro.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/powerpc/platforms/cell/pervasive.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/powerpc/platforms/cell/pervasive.c
++++ b/arch/powerpc/platforms/cell/pervasive.c
+@@ -77,6 +77,7 @@ static int cbe_system_reset_exception(st
+       switch (regs->msr & SRR1_WAKEMASK) {
+       case SRR1_WAKEDEC:
+               set_dec(1);
++              break;
+       case SRR1_WAKEEE:
+               /*
+                * Handle these when interrupts get re-enabled and we take
diff --git a/queue-5.10/powerpc-fsl-dts-enable-wa-for-erratum-a-009885-on-fman3l-mdio-buses.patch b/queue-5.10/powerpc-fsl-dts-enable-wa-for-erratum-a-009885-on-fman3l-mdio-buses.patch
new file mode 100644 (file)
index 0000000..49f1f30
--- /dev/null
@@ -0,0 +1,38 @@
+From 0d375d610fa96524e2ee2b46830a46a7bfa92a9f Mon Sep 17 00:00:00 2001
+From: Tobias Waldekranz <tobias@waldekranz.com>
+Date: Tue, 18 Jan 2022 22:50:52 +0100
+Subject: powerpc/fsl/dts: Enable WA for erratum A-009885 on fman3l MDIO buses
+
+From: Tobias Waldekranz <tobias@waldekranz.com>
+
+commit 0d375d610fa96524e2ee2b46830a46a7bfa92a9f upstream.
+
+This block is used in (at least) T1024 and T1040, including their
+variants like T1023 etc.
+
+Fixes: d55ad2967d89 ("powerpc/mpc85xx: Create dts components for the FSL QorIQ DPAA FMan")
+Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi
+@@ -79,6 +79,7 @@ fman0: fman@400000 {
+               #size-cells = <0>;
+               compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
+               reg = <0xfc000 0x1000>;
++              fsl,erratum-a009885;
+       };
+       xmdio0: mdio@fd000 {
+@@ -86,6 +87,7 @@ fman0: fman@400000 {
+               #size-cells = <0>;
+               compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
+               reg = <0xfd000 0x1000>;
++              fsl,erratum-a009885;
+       };
+ };
index b5abaee3bd8d2545e449938419714d621495feda..3f15eebb00d4cbd997fb81b263e3592bf74cdf7b 100644 (file)
@@ -500,3 +500,6 @@ rdma-hns-modify-the-mapping-attribute-of-doorbell-to-device.patch
 rdma-rxe-fix-a-typo-in-opcode-name.patch
 dmaengine-stm32-mdma-fix-stm32_mdma_ctbr_tsel_mask.patch
 revert-net-mlx5-add-retry-mechanism-to-the-command-entry-index-allocation.patch
+powerpc-cell-fix-clang-wimplicit-fallthrough-warning.patch
+powerpc-fsl-dts-enable-wa-for-erratum-a-009885-on-fman3l-mdio-buses.patch
+block-fix-fsync-always-failed-if-once-failed.patch