From: Greg Kroah-Hartman Date: Mon, 4 Apr 2022 10:21:54 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v5.17.2~67 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=efb00b9343f34e497fb001e5ec338572740b8738;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: bpf-fix-comment-for-helper-bpf_current_task_under_cgroup.patch dt-bindings-mtd-nand-controller-fix-a-comment-in-the-examples.patch dt-bindings-mtd-nand-controller-fix-the-reg-property-description.patch dt-bindings-spi-mxic-the-interrupt-property-is-not-mandatory.patch ubi-fastmap-return-error-code-if-memory-allocation-fails-in-add_aeb.patch --- diff --git a/queue-5.4/bpf-fix-comment-for-helper-bpf_current_task_under_cgroup.patch b/queue-5.4/bpf-fix-comment-for-helper-bpf_current_task_under_cgroup.patch new file mode 100644 index 00000000000..84d143f1cd6 --- /dev/null +++ b/queue-5.4/bpf-fix-comment-for-helper-bpf_current_task_under_cgroup.patch @@ -0,0 +1,48 @@ +From 58617014405ad5c9f94f464444f4972dabb71ca7 Mon Sep 17 00:00:00 2001 +From: Hengqi Chen +Date: Thu, 10 Mar 2022 23:53:35 +0800 +Subject: bpf: Fix comment for helper bpf_current_task_under_cgroup() + +From: Hengqi Chen + +commit 58617014405ad5c9f94f464444f4972dabb71ca7 upstream. + +Fix the descriptions of the return values of helper bpf_current_task_under_cgroup(). + +Fixes: c6b5fb8690fa ("bpf: add documentation for eBPF helpers (42-50)") +Signed-off-by: Hengqi Chen +Signed-off-by: Daniel Borkmann +Acked-by: Yonghong Song +Link: https://lore.kernel.org/bpf/20220310155335.1278783-1-hengqi.chen@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + include/uapi/linux/bpf.h | 4 ++-- + tools/include/uapi/linux/bpf.h | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +--- a/include/uapi/linux/bpf.h ++++ b/include/uapi/linux/bpf.h +@@ -1294,8 +1294,8 @@ union bpf_attr { + * Return + * The return value depends on the result of the test, and can be: + * +- * * 0, if current task belongs to the cgroup2. +- * * 1, if current task does not belong to the cgroup2. ++ * * 1, if current task belongs to the cgroup2. ++ * * 0, if current task does not belong to the cgroup2. + * * A negative error code, if an error occurred. + * + * int bpf_skb_change_tail(struct sk_buff *skb, u32 len, u64 flags) +--- a/tools/include/uapi/linux/bpf.h ++++ b/tools/include/uapi/linux/bpf.h +@@ -1294,8 +1294,8 @@ union bpf_attr { + * Return + * The return value depends on the result of the test, and can be: + * +- * * 0, if current task belongs to the cgroup2. +- * * 1, if current task does not belong to the cgroup2. ++ * * 1, if current task belongs to the cgroup2. ++ * * 0, if current task does not belong to the cgroup2. + * * A negative error code, if an error occurred. + * + * int bpf_skb_change_tail(struct sk_buff *skb, u32 len, u64 flags) diff --git a/queue-5.4/dt-bindings-mtd-nand-controller-fix-a-comment-in-the-examples.patch b/queue-5.4/dt-bindings-mtd-nand-controller-fix-a-comment-in-the-examples.patch new file mode 100644 index 00000000000..994c0a1878f --- /dev/null +++ b/queue-5.4/dt-bindings-mtd-nand-controller-fix-a-comment-in-the-examples.patch @@ -0,0 +1,32 @@ +From 0e7f1b557974ce297e5e4c9d4245720fbb489886 Mon Sep 17 00:00:00 2001 +From: Miquel Raynal +Date: Thu, 16 Dec 2021 12:16:28 +0100 +Subject: dt-bindings: mtd: nand-controller: Fix a comment in the examples + +From: Miquel Raynal + +commit 0e7f1b557974ce297e5e4c9d4245720fbb489886 upstream. + +The controller properties should be in the controller 'parent' node, +while properties in the children nodes are specific to the NAND +*chip*. This error was already present during the yaml conversion. + +Fixes: 2d472aba15ff ("mtd: nand: document the NAND controller/NAND chip DT representation") +Signed-off-by: Miquel Raynal +Acked-by: Rob Herring +Link: https://lore.kernel.org/linux-mtd/20211216111654.238086-3-miquel.raynal@bootlin.com +Signed-off-by: Greg Kroah-Hartman +--- + Documentation/devicetree/bindings/mtd/nand-controller.yaml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/Documentation/devicetree/bindings/mtd/nand-controller.yaml ++++ b/Documentation/devicetree/bindings/mtd/nand-controller.yaml +@@ -139,6 +139,6 @@ examples: + nand-ecc-mode = "soft"; + nand-ecc-algo = "bch"; + +- /* controller specific properties */ ++ /* NAND chip specific properties */ + }; + }; diff --git a/queue-5.4/dt-bindings-mtd-nand-controller-fix-the-reg-property-description.patch b/queue-5.4/dt-bindings-mtd-nand-controller-fix-the-reg-property-description.patch new file mode 100644 index 00000000000..f4f3b7f2b2d --- /dev/null +++ b/queue-5.4/dt-bindings-mtd-nand-controller-fix-the-reg-property-description.patch @@ -0,0 +1,33 @@ +From 93f2ec9e401276fb4ea9903194a5bfcf175f9a2c Mon Sep 17 00:00:00 2001 +From: Miquel Raynal +Date: Thu, 16 Dec 2021 12:16:27 +0100 +Subject: dt-bindings: mtd: nand-controller: Fix the reg property description + +From: Miquel Raynal + +commit 93f2ec9e401276fb4ea9903194a5bfcf175f9a2c upstream. + +The reg property of a NAND device always references the chip-selects. +The ready/busy lines are described in the nand-rb property. I believe +this was a harmless copy/paste error during the conversion to yaml. + +Fixes: 212e49693592 ("dt-bindings: mtd: Add YAML schemas for the generic NAND options") +Signed-off-by: Miquel Raynal +Acked-by: Rob Herring +Link: https://lore.kernel.org/linux-mtd/20211216111654.238086-2-miquel.raynal@bootlin.com +Signed-off-by: Greg Kroah-Hartman +--- + Documentation/devicetree/bindings/mtd/nand-controller.yaml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/Documentation/devicetree/bindings/mtd/nand-controller.yaml ++++ b/Documentation/devicetree/bindings/mtd/nand-controller.yaml +@@ -44,7 +44,7 @@ patternProperties: + properties: + reg: + description: +- Contains the native Ready/Busy IDs. ++ Contains the chip-select IDs. + + nand-ecc-mode: + allOf: diff --git a/queue-5.4/dt-bindings-spi-mxic-the-interrupt-property-is-not-mandatory.patch b/queue-5.4/dt-bindings-spi-mxic-the-interrupt-property-is-not-mandatory.patch new file mode 100644 index 00000000000..e8476023cb3 --- /dev/null +++ b/queue-5.4/dt-bindings-spi-mxic-the-interrupt-property-is-not-mandatory.patch @@ -0,0 +1,40 @@ +From 90c204d3195a795f77f5bce767e311dd1c59ca17 Mon Sep 17 00:00:00 2001 +From: Miquel Raynal +Date: Thu, 16 Dec 2021 12:16:33 +0100 +Subject: dt-bindings: spi: mxic: The interrupt property is not mandatory + +From: Miquel Raynal + +commit 90c204d3195a795f77f5bce767e311dd1c59ca17 upstream. + +The interrupt property is not mandatory at all, this property should not +be part of the required properties list, so move it into the optional +properties list. + +Fixes: 326e5c8d4a87 ("dt-binding: spi: Document Macronix controller bindings") +Signed-off-by: Miquel Raynal +Reviewed-by: Rob Herring +Reviewed-by: Mark Brown +Link: https://lore.kernel.org/linux-mtd/20211216111654.238086-8-miquel.raynal@bootlin.com +Signed-off-by: Greg Kroah-Hartman +--- + Documentation/devicetree/bindings/spi/spi-mxic.txt | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/Documentation/devicetree/bindings/spi/spi-mxic.txt ++++ b/Documentation/devicetree/bindings/spi/spi-mxic.txt +@@ -8,11 +8,13 @@ Required properties: + - reg: should contain 2 entries, one for the registers and one for the direct + mapping area + - reg-names: should contain "regs" and "dirmap" +-- interrupts: interrupt line connected to the SPI controller + - clock-names: should contain "ps_clk", "send_clk" and "send_dly_clk" + - clocks: should contain 3 entries for the "ps_clk", "send_clk" and + "send_dly_clk" clocks + ++Optional properties: ++- interrupts: interrupt line connected to the SPI controller ++ + Example: + + spi@43c30000 { diff --git a/queue-5.4/series b/queue-5.4/series index 0c07f3c07f7..2afd003264f 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -356,3 +356,8 @@ asoc-soc-compress-change-the-check-for-codec_dai.patch mm-mmap-return-1-from-stack_guard_gap-__setup-handler.patch mm-memcontrol-return-1-from-cgroup.memory-__setup-handler.patch mm-usercopy-return-1-from-hardened_usercopy-__setup-handler.patch +bpf-fix-comment-for-helper-bpf_current_task_under_cgroup.patch +dt-bindings-mtd-nand-controller-fix-the-reg-property-description.patch +dt-bindings-mtd-nand-controller-fix-a-comment-in-the-examples.patch +dt-bindings-spi-mxic-the-interrupt-property-is-not-mandatory.patch +ubi-fastmap-return-error-code-if-memory-allocation-fails-in-add_aeb.patch diff --git a/queue-5.4/ubi-fastmap-return-error-code-if-memory-allocation-fails-in-add_aeb.patch b/queue-5.4/ubi-fastmap-return-error-code-if-memory-allocation-fails-in-add_aeb.patch new file mode 100644 index 00000000000..03437d1ce66 --- /dev/null +++ b/queue-5.4/ubi-fastmap-return-error-code-if-memory-allocation-fails-in-add_aeb.patch @@ -0,0 +1,86 @@ +From c3c07fc25f37c157fde041b3a0c3dfcb1590cbce Mon Sep 17 00:00:00 2001 +From: Zhihao Cheng +Date: Mon, 27 Dec 2021 11:22:42 +0800 +Subject: ubi: fastmap: Return error code if memory allocation fails in add_aeb() + +From: Zhihao Cheng + +commit c3c07fc25f37c157fde041b3a0c3dfcb1590cbce upstream. + +Abort fastmap scanning and return error code if memory allocation fails +in add_aeb(). Otherwise ubi will get wrong peb statistics information +after scanning. + +Fixes: dbb7d2a88d2a7b ("UBI: Add fastmap core") +Signed-off-by: Zhihao Cheng +Signed-off-by: Richard Weinberger +Signed-off-by: Greg Kroah-Hartman +--- + drivers/mtd/ubi/fastmap.c | 28 +++++++++++++++++++--------- + 1 file changed, 19 insertions(+), 9 deletions(-) + +--- a/drivers/mtd/ubi/fastmap.c ++++ b/drivers/mtd/ubi/fastmap.c +@@ -468,7 +468,9 @@ static int scan_pool(struct ubi_device * + if (err == UBI_IO_FF_BITFLIPS) + scrub = 1; + +- add_aeb(ai, free, pnum, ec, scrub); ++ ret = add_aeb(ai, free, pnum, ec, scrub); ++ if (ret) ++ goto out; + continue; + } else if (err == 0 || err == UBI_IO_BITFLIPS) { + dbg_bld("Found non empty PEB:%i in pool", pnum); +@@ -638,8 +640,10 @@ static int ubi_attach_fastmap(struct ubi + if (fm_pos >= fm_size) + goto fail_bad; + +- add_aeb(ai, &ai->free, be32_to_cpu(fmec->pnum), +- be32_to_cpu(fmec->ec), 0); ++ ret = add_aeb(ai, &ai->free, be32_to_cpu(fmec->pnum), ++ be32_to_cpu(fmec->ec), 0); ++ if (ret) ++ goto fail; + } + + /* read EC values from used list */ +@@ -649,8 +653,10 @@ static int ubi_attach_fastmap(struct ubi + if (fm_pos >= fm_size) + goto fail_bad; + +- add_aeb(ai, &used, be32_to_cpu(fmec->pnum), +- be32_to_cpu(fmec->ec), 0); ++ ret = add_aeb(ai, &used, be32_to_cpu(fmec->pnum), ++ be32_to_cpu(fmec->ec), 0); ++ if (ret) ++ goto fail; + } + + /* read EC values from scrub list */ +@@ -660,8 +666,10 @@ static int ubi_attach_fastmap(struct ubi + if (fm_pos >= fm_size) + goto fail_bad; + +- add_aeb(ai, &used, be32_to_cpu(fmec->pnum), +- be32_to_cpu(fmec->ec), 1); ++ ret = add_aeb(ai, &used, be32_to_cpu(fmec->pnum), ++ be32_to_cpu(fmec->ec), 1); ++ if (ret) ++ goto fail; + } + + /* read EC values from erase list */ +@@ -671,8 +679,10 @@ static int ubi_attach_fastmap(struct ubi + if (fm_pos >= fm_size) + goto fail_bad; + +- add_aeb(ai, &ai->erase, be32_to_cpu(fmec->pnum), +- be32_to_cpu(fmec->ec), 1); ++ ret = add_aeb(ai, &ai->erase, be32_to_cpu(fmec->pnum), ++ be32_to_cpu(fmec->ec), 1); ++ if (ret) ++ goto fail; + } + + ai->mean_ec = div_u64(ai->ec_sum, ai->ec_count);