From: Greg Kroah-Hartman Date: Mon, 24 Jan 2022 11:37:34 +0000 (+0100) Subject: 5.10-stable patches X-Git-Tag: v4.4.300~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=997f020a76ae61d52d6f2c08a9ef849f9b2517c6;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches 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 --- 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 index 00000000000..65d823c3400 --- /dev/null +++ b/queue-5.10/block-fix-fsync-always-failed-if-once-failed.patch @@ -0,0 +1,62 @@ +From 8a7518931baa8ea023700987f3db31cb0a80610b Mon Sep 17 00:00:00 2001 +From: Ye Bin +Date: Mon, 29 Nov 2021 09:26:59 +0800 +Subject: block: Fix fsync always failed if once failed + +From: Ye Bin + +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] + -0 [007] ..s. 19654.923562: block_rq_complete: 8,0 FF () 18446744073709551615 + 0 [0] + -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 +Reviewed-by: Ming Lei +Link: https://lore.kernel.org/r/20211129012659.1553733-1-yebin10@huawei.com +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..416f850c8fb --- /dev/null +++ b/queue-5.10/powerpc-cell-fix-clang-wimplicit-fallthrough-warning.patch @@ -0,0 +1,47 @@ +From e89257e28e844f5d1d39081bb901d9f1183a7705 Mon Sep 17 00:00:00 2001 +From: Anders Roxell +Date: Tue, 7 Dec 2021 12:02:28 +0100 +Subject: powerpc/cell: Fix clang -Wimplicit-fallthrough warning + +From: Anders Roxell + +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 +Signed-off-by: Anders Roxell +Reviewed-by: Nathan Chancellor +Reviewed-by: Arnd Bergmann +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/20211207110228.698956-1-anders.roxell@linaro.org +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..49f1f30e8e9 --- /dev/null +++ b/queue-5.10/powerpc-fsl-dts-enable-wa-for-erratum-a-009885-on-fman3l-mdio-buses.patch @@ -0,0 +1,38 @@ +From 0d375d610fa96524e2ee2b46830a46a7bfa92a9f Mon Sep 17 00:00:00 2001 +From: Tobias Waldekranz +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 + +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 +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + 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; + }; + }; + diff --git a/queue-5.10/series b/queue-5.10/series index b5abaee3bd8..3f15eebb00d 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -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