]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Apr 2022 10:21:54 +0000 (12:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Apr 2022 10:21:54 +0000 (12:21 +0200)
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

queue-5.4/bpf-fix-comment-for-helper-bpf_current_task_under_cgroup.patch [new file with mode: 0644]
queue-5.4/dt-bindings-mtd-nand-controller-fix-a-comment-in-the-examples.patch [new file with mode: 0644]
queue-5.4/dt-bindings-mtd-nand-controller-fix-the-reg-property-description.patch [new file with mode: 0644]
queue-5.4/dt-bindings-spi-mxic-the-interrupt-property-is-not-mandatory.patch [new file with mode: 0644]
queue-5.4/series
queue-5.4/ubi-fastmap-return-error-code-if-memory-allocation-fails-in-add_aeb.patch [new file with mode: 0644]

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 (file)
index 0000000..84d143f
--- /dev/null
@@ -0,0 +1,48 @@
+From 58617014405ad5c9f94f464444f4972dabb71ca7 Mon Sep 17 00:00:00 2001
+From: Hengqi Chen <hengqi.chen@gmail.com>
+Date: Thu, 10 Mar 2022 23:53:35 +0800
+Subject: bpf: Fix comment for helper bpf_current_task_under_cgroup()
+
+From: Hengqi Chen <hengqi.chen@gmail.com>
+
+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 <hengqi.chen@gmail.com>
+Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
+Acked-by: Yonghong Song <yhs@fb.com>
+Link: https://lore.kernel.org/bpf/20220310155335.1278783-1-hengqi.chen@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..994c0a1
--- /dev/null
@@ -0,0 +1,32 @@
+From 0e7f1b557974ce297e5e4c9d4245720fbb489886 Mon Sep 17 00:00:00 2001
+From: Miquel Raynal <miquel.raynal@bootlin.com>
+Date: Thu, 16 Dec 2021 12:16:28 +0100
+Subject: dt-bindings: mtd: nand-controller: Fix a comment in the examples
+
+From: Miquel Raynal <miquel.raynal@bootlin.com>
+
+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 <miquel.raynal@bootlin.com>
+Acked-by: Rob Herring <robh@kernel.org>
+Link: https://lore.kernel.org/linux-mtd/20211216111654.238086-3-miquel.raynal@bootlin.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..f4f3b7f
--- /dev/null
@@ -0,0 +1,33 @@
+From 93f2ec9e401276fb4ea9903194a5bfcf175f9a2c Mon Sep 17 00:00:00 2001
+From: Miquel Raynal <miquel.raynal@bootlin.com>
+Date: Thu, 16 Dec 2021 12:16:27 +0100
+Subject: dt-bindings: mtd: nand-controller: Fix the reg property description
+
+From: Miquel Raynal <miquel.raynal@bootlin.com>
+
+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 <miquel.raynal@bootlin.com>
+Acked-by: Rob Herring <robh@kernel.org>
+Link: https://lore.kernel.org/linux-mtd/20211216111654.238086-2-miquel.raynal@bootlin.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..e847602
--- /dev/null
@@ -0,0 +1,40 @@
+From 90c204d3195a795f77f5bce767e311dd1c59ca17 Mon Sep 17 00:00:00 2001
+From: Miquel Raynal <miquel.raynal@bootlin.com>
+Date: Thu, 16 Dec 2021 12:16:33 +0100
+Subject: dt-bindings: spi: mxic: The interrupt property is not mandatory
+
+From: Miquel Raynal <miquel.raynal@bootlin.com>
+
+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 <miquel.raynal@bootlin.com>
+Reviewed-by: Rob Herring <robh@kernel.org>
+Reviewed-by: Mark Brown <broonie@kernel.org>
+Link: https://lore.kernel.org/linux-mtd/20211216111654.238086-8-miquel.raynal@bootlin.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 {
index 0c07f3c07f7b489f46bacb30802c2a308585a0e7..2afd003264f4a3894504ae08e81f8bb5fdf609e0 100644 (file)
@@ -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 (file)
index 0000000..03437d1
--- /dev/null
@@ -0,0 +1,86 @@
+From c3c07fc25f37c157fde041b3a0c3dfcb1590cbce Mon Sep 17 00:00:00 2001
+From: Zhihao Cheng <chengzhihao1@huawei.com>
+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 <chengzhihao1@huawei.com>
+
+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 <chengzhihao1@huawei.com>
+Signed-off-by: Richard Weinberger <richard@nod.at>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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);