]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.19
authorSasha Levin <sashal@kernel.org>
Mon, 20 Sep 2021 15:39:41 +0000 (11:39 -0400)
committerSasha Levin <sashal@kernel.org>
Mon, 20 Sep 2021 15:39:41 +0000 (11:39 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
20 files changed:
queue-4.19/arc-export-clear_user_page-for-modules.patch [new file with mode: 0644]
queue-4.19/block-bfq-honor-already-setup-queue-merges.patch [new file with mode: 0644]
queue-4.19/dt-bindings-mtd-gpmc-fix-the-ecc-bytes-vs.-oob-bytes.patch [new file with mode: 0644]
queue-4.19/ethtool-fix-an-error-code-in-cxgb2.c.patch [new file with mode: 0644]
queue-4.19/fq_codel-reject-silly-quantum-parameters.patch [new file with mode: 0644]
queue-4.19/ip_gre-validate-csum_start-only-on-pull.patch [new file with mode: 0644]
queue-4.19/kvm-arm64-handle-psci-resets-before-userspace-touche.patch [new file with mode: 0644]
queue-4.19/mfd-axp20x-update-axp288-volatile-ranges.patch [new file with mode: 0644]
queue-4.19/mfd-don-t-use-irq_create_mapping-to-resolve-a-mappin.patch [new file with mode: 0644]
queue-4.19/mtd-rawnand-cafe-fix-a-resource-leak-in-the-error-ha.patch [new file with mode: 0644]
queue-4.19/net-dsa-b53-fix-calculating-number-of-switch-ports.patch [new file with mode: 0644]
queue-4.19/net-renesas-sh_eth-fix-freeing-wrong-tx-descriptor.patch [new file with mode: 0644]
queue-4.19/net-usb-cdc_mbim-avoid-altsetting-toggling-for-telit.patch [new file with mode: 0644]
queue-4.19/netfilter-socket-icmp6-fix-use-after-scope.patch [new file with mode: 0644]
queue-4.19/ntb-perf-fix-an-error-code-in-perf_setup_inbuf.patch [new file with mode: 0644]
queue-4.19/pci-add-acs-quirks-for-cavium-multi-function-devices.patch [new file with mode: 0644]
queue-4.19/pci-fix-pci_dev_str_match_path-alloc-while-atomic-bu.patch [new file with mode: 0644]
queue-4.19/pci-sync-__pci_register_driver-stub-for-config_pci-n.patch [new file with mode: 0644]
queue-4.19/qlcnic-remove-redundant-unlock-in-qlcnic_pinit_from_.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/arc-export-clear_user_page-for-modules.patch b/queue-4.19/arc-export-clear_user_page-for-modules.patch
new file mode 100644 (file)
index 0000000..138172e
--- /dev/null
@@ -0,0 +1,45 @@
+From 57b3533f285a5867f2dfec26628dffebc0bbb540 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 16 Aug 2021 14:05:33 -0700
+Subject: ARC: export clear_user_page() for modules
+
+From: Randy Dunlap <rdunlap@infradead.org>
+
+[ Upstream commit 6b5ff0405e4190f23780362ea324b250bc495683 ]
+
+0day bot reports a build error:
+  ERROR: modpost: "clear_user_page" [drivers/media/v4l2-core/videobuf-dma-sg.ko] undefined!
+so export it in arch/arc/ to fix the build error.
+
+In most ARCHes, clear_user_page() is a macro. OTOH, in a few
+ARCHes it is a function and needs to be exported.
+PowerPC exported it in 2004. It looks like nds32 and nios2
+still need to have it exported.
+
+Fixes: 4102b53392d63 ("ARC: [mm] Aliasing VIPT dcache support 2/4")
+Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
+Reported-by: kernel test robot <lkp@intel.com>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Cc: linux-snps-arc@lists.infradead.org
+Signed-off-by: Vineet Gupta <vgupta@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arc/mm/cache.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c
+index cf9619d4efb4..c5254c5967ed 100644
+--- a/arch/arc/mm/cache.c
++++ b/arch/arc/mm/cache.c
+@@ -1112,7 +1112,7 @@ void clear_user_page(void *to, unsigned long u_vaddr, struct page *page)
+       clear_page(to);
+       clear_bit(PG_dc_clean, &page->flags);
+ }
+-
++EXPORT_SYMBOL(clear_user_page);
+ /**********************************************************************
+  * Explicit Cache flush request from user space via syscall
+-- 
+2.30.2
+
diff --git a/queue-4.19/block-bfq-honor-already-setup-queue-merges.patch b/queue-4.19/block-bfq-honor-already-setup-queue-merges.patch
new file mode 100644 (file)
index 0000000..6938e2d
--- /dev/null
@@ -0,0 +1,85 @@
+From 0913d2fa2f4c0b209afd41ac1e4443640b001e88 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 2 Aug 2021 16:13:52 +0200
+Subject: block, bfq: honor already-setup queue merges
+
+From: Paolo Valente <paolo.valente@linaro.org>
+
+[ Upstream commit 2d52c58b9c9bdae0ca3df6a1eab5745ab3f7d80b ]
+
+The function bfq_setup_merge prepares the merging between two
+bfq_queues, say bfqq and new_bfqq. To this goal, it assigns
+bfqq->new_bfqq = new_bfqq. Then, each time some I/O for bfqq arrives,
+the process that generated that I/O is disassociated from bfqq and
+associated with new_bfqq (merging is actually a redirection). In this
+respect, bfq_setup_merge increases new_bfqq->ref in advance, adding
+the number of processes that are expected to be associated with
+new_bfqq.
+
+Unfortunately, the stable-merging mechanism interferes with this
+setup. After bfqq->new_bfqq has been set by bfq_setup_merge, and
+before all the expected processes have been associated with
+bfqq->new_bfqq, bfqq may happen to be stably merged with a different
+queue than the current bfqq->new_bfqq. In this case, bfqq->new_bfqq
+gets changed. So, some of the processes that have been already
+accounted for in the ref counter of the previous new_bfqq will not be
+associated with that queue.  This creates an unbalance, because those
+references will never be decremented.
+
+This commit fixes this issue by reestablishing the previous, natural
+behaviour: once bfqq->new_bfqq has been set, it will not be changed
+until all expected redirections have occurred.
+
+Signed-off-by: Davide Zini <davidezini2@gmail.com>
+Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
+Link: https://lore.kernel.org/r/20210802141352.74353-2-paolo.valente@linaro.org
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ block/bfq-iosched.c | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
+index b2bad345c523..c8c94e8e0f72 100644
+--- a/block/bfq-iosched.c
++++ b/block/bfq-iosched.c
+@@ -2137,6 +2137,15 @@ bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq)
+        * are likely to increase the throughput.
+        */
+       bfqq->new_bfqq = new_bfqq;
++      /*
++       * The above assignment schedules the following redirections:
++       * each time some I/O for bfqq arrives, the process that
++       * generated that I/O is disassociated from bfqq and
++       * associated with new_bfqq. Here we increases new_bfqq->ref
++       * in advance, adding the number of processes that are
++       * expected to be associated with new_bfqq as they happen to
++       * issue I/O.
++       */
+       new_bfqq->ref += process_refs;
+       return new_bfqq;
+ }
+@@ -2196,6 +2205,10 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq,
+ {
+       struct bfq_queue *in_service_bfqq, *new_bfqq;
++      /* if a merge has already been setup, then proceed with that first */
++      if (bfqq->new_bfqq)
++              return bfqq->new_bfqq;
++
+       /*
+        * Prevent bfqq from being merged if it has been created too
+        * long ago. The idea is that true cooperating processes, and
+@@ -2210,9 +2223,6 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq,
+       if (bfq_too_late_for_merging(bfqq))
+               return NULL;
+-      if (bfqq->new_bfqq)
+-              return bfqq->new_bfqq;
+-
+       if (!io_struct || unlikely(bfqq == &bfqd->oom_bfqq))
+               return NULL;
+-- 
+2.30.2
+
diff --git a/queue-4.19/dt-bindings-mtd-gpmc-fix-the-ecc-bytes-vs.-oob-bytes.patch b/queue-4.19/dt-bindings-mtd-gpmc-fix-the-ecc-bytes-vs.-oob-bytes.patch
new file mode 100644 (file)
index 0000000..72274f7
--- /dev/null
@@ -0,0 +1,43 @@
+From 50fdb4beeddb6d8b18967c14fc0244a032524d2d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 10 Jun 2021 16:39:45 +0200
+Subject: dt-bindings: mtd: gpmc: Fix the ECC bytes vs. OOB bytes equation
+
+From: Miquel Raynal <miquel.raynal@bootlin.com>
+
+[ Upstream commit 778cb8e39f6ec252be50fc3850d66f3dcbd5dd5a ]
+
+"PAGESIZE / 512" is the number of ECC chunks.
+"ECC_BYTES" is the number of bytes needed to store a single ECC code.
+"2" is the space reserved by the bad block marker.
+
+"2 + (PAGESIZE / 512) * ECC_BYTES" should of course be lower or equal
+than the total number of OOB bytes, otherwise it won't fit.
+
+Fix the equation by substituting s/>=/<=/.
+
+Suggested-by: Ryan J. Barnett <ryan.barnett@collins.com>
+Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
+Acked-by: Rob Herring <robh@kernel.org>
+Link: https://lore.kernel.org/linux-mtd/20210610143945.3504781-1-miquel.raynal@bootlin.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ Documentation/devicetree/bindings/mtd/gpmc-nand.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
+index c059ab74ed88..a4a75fa79524 100644
+--- a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
++++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
+@@ -122,7 +122,7 @@ on various other factors also like;
+       so the device should have enough free bytes available its OOB/Spare
+       area to accommodate ECC for entire page. In general following expression
+       helps in determining if given device can accommodate ECC syndrome:
+-      "2 + (PAGESIZE / 512) * ECC_BYTES" >= OOBSIZE"
++      "2 + (PAGESIZE / 512) * ECC_BYTES" <= OOBSIZE"
+       where
+               OOBSIZE         number of bytes in OOB/spare area
+               PAGESIZE        number of bytes in main-area of device page
+-- 
+2.30.2
+
diff --git a/queue-4.19/ethtool-fix-an-error-code-in-cxgb2.c.patch b/queue-4.19/ethtool-fix-an-error-code-in-cxgb2.c.patch
new file mode 100644 (file)
index 0000000..6170fc7
--- /dev/null
@@ -0,0 +1,39 @@
+From e0927d50d728d5b8c49aca5c778c84b9ca1263ac Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 3 Sep 2021 14:42:33 +0800
+Subject: ethtool: Fix an error code in cxgb2.c
+
+From: Yang Li <yang.lee@linux.alibaba.com>
+
+[ Upstream commit 7db8263a12155c7ae4ad97e850f1e499c73765fc ]
+
+When adapter->registered_device_map is NULL, the value of err is
+uncertain, we set err to -EINVAL to avoid ambiguity.
+
+Clean up smatch warning:
+drivers/net/ethernet/chelsio/cxgb/cxgb2.c:1114 init_one() warn: missing
+error code 'err'
+
+Reported-by: Abaci Robot <abaci@linux.alibaba.com>
+Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c
+index 0ccdde366ae1..540d99f59226 100644
+--- a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c
++++ b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c
+@@ -1153,6 +1153,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
+       if (!adapter->registered_device_map) {
+               pr_err("%s: could not register any net devices\n",
+                      pci_name(pdev));
++              err = -EINVAL;
+               goto out_release_adapter_res;
+       }
+-- 
+2.30.2
+
diff --git a/queue-4.19/fq_codel-reject-silly-quantum-parameters.patch b/queue-4.19/fq_codel-reject-silly-quantum-parameters.patch
new file mode 100644 (file)
index 0000000..e8c019d
--- /dev/null
@@ -0,0 +1,89 @@
+From 9be4129db14c639e3e879448e22e1da83236e2c4 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 3 Sep 2021 15:03:43 -0700
+Subject: fq_codel: reject silly quantum parameters
+
+From: Eric Dumazet <edumazet@google.com>
+
+[ Upstream commit c7c5e6ff533fe1f9afef7d2fa46678987a1335a7 ]
+
+syzbot found that forcing a big quantum attribute would crash hosts fast,
+essentially using this:
+
+tc qd replace dev eth0 root fq_codel quantum 4294967295
+
+This is because fq_codel_dequeue() would have to loop
+~2^31 times in :
+
+       if (flow->deficit <= 0) {
+               flow->deficit += q->quantum;
+               list_move_tail(&flow->flowchain, &q->old_flows);
+               goto begin;
+       }
+
+SFQ max quantum is 2^19 (half a megabyte)
+Lets adopt a max quantum of one megabyte for FQ_CODEL.
+
+Fixes: 4b549a2ef4be ("fq_codel: Fair Queue Codel AQM")
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Reported-by: syzbot <syzkaller@googlegroups.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/uapi/linux/pkt_sched.h |  2 ++
+ net/sched/sch_fq_codel.c       | 12 ++++++++++--
+ 2 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
+index 8975fd1a1421..24ce2aab8946 100644
+--- a/include/uapi/linux/pkt_sched.h
++++ b/include/uapi/linux/pkt_sched.h
+@@ -779,6 +779,8 @@ struct tc_codel_xstats {
+ /* FQ_CODEL */
++#define FQ_CODEL_QUANTUM_MAX (1 << 20)
++
+ enum {
+       TCA_FQ_CODEL_UNSPEC,
+       TCA_FQ_CODEL_TARGET,
+diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
+index a862d9990be7..e4f69c779b8c 100644
+--- a/net/sched/sch_fq_codel.c
++++ b/net/sched/sch_fq_codel.c
+@@ -382,6 +382,7 @@ static int fq_codel_change(struct Qdisc *sch, struct nlattr *opt,
+ {
+       struct fq_codel_sched_data *q = qdisc_priv(sch);
+       struct nlattr *tb[TCA_FQ_CODEL_MAX + 1];
++      u32 quantum = 0;
+       int err;
+       if (!opt)
+@@ -399,6 +400,13 @@ static int fq_codel_change(struct Qdisc *sch, struct nlattr *opt,
+                   q->flows_cnt > 65536)
+                       return -EINVAL;
+       }
++      if (tb[TCA_FQ_CODEL_QUANTUM]) {
++              quantum = max(256U, nla_get_u32(tb[TCA_FQ_CODEL_QUANTUM]));
++              if (quantum > FQ_CODEL_QUANTUM_MAX) {
++                      NL_SET_ERR_MSG(extack, "Invalid quantum");
++                      return -EINVAL;
++              }
++      }
+       sch_tree_lock(sch);
+       if (tb[TCA_FQ_CODEL_TARGET]) {
+@@ -425,8 +433,8 @@ static int fq_codel_change(struct Qdisc *sch, struct nlattr *opt,
+       if (tb[TCA_FQ_CODEL_ECN])
+               q->cparams.ecn = !!nla_get_u32(tb[TCA_FQ_CODEL_ECN]);
+-      if (tb[TCA_FQ_CODEL_QUANTUM])
+-              q->quantum = max(256U, nla_get_u32(tb[TCA_FQ_CODEL_QUANTUM]));
++      if (quantum)
++              q->quantum = quantum;
+       if (tb[TCA_FQ_CODEL_DROP_BATCH_SIZE])
+               q->drop_batch_size = max(1U, nla_get_u32(tb[TCA_FQ_CODEL_DROP_BATCH_SIZE]));
+-- 
+2.30.2
+
diff --git a/queue-4.19/ip_gre-validate-csum_start-only-on-pull.patch b/queue-4.19/ip_gre-validate-csum_start-only-on-pull.patch
new file mode 100644 (file)
index 0000000..c320ebd
--- /dev/null
@@ -0,0 +1,77 @@
+From 15339abb7c68d015442b453600231daec620ba8d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 5 Sep 2021 11:21:09 -0400
+Subject: ip_gre: validate csum_start only on pull
+
+From: Willem de Bruijn <willemb@google.com>
+
+[ Upstream commit 8a0ed250f911da31a2aef52101bc707846a800ff ]
+
+The GRE tunnel device can pull existing outer headers in ipge_xmit.
+This is a rare path, apparently unique to this device. The below
+commit ensured that pulling does not move skb->data beyond csum_start.
+
+But it has a false positive if ip_summed is not CHECKSUM_PARTIAL and
+thus csum_start is irrelevant.
+
+Refine to exclude this. At the same time simplify and strengthen the
+test.
+
+Simplify, by moving the check next to the offending pull, making it
+more self documenting and removing an unnecessary branch from other
+code paths.
+
+Strengthen, by also ensuring that the transport header is correct and
+therefore the inner headers will be after skb_reset_inner_headers.
+The transport header is set to csum_start in skb_partial_csum_set.
+
+Link: https://lore.kernel.org/netdev/YS+h%2FtqCJJiQei+W@shredder/
+Fixes: 1d011c4803c7 ("ip_gre: add validation for csum_start")
+Reported-by: Ido Schimmel <idosch@idosch.org>
+Suggested-by: Alexander Duyck <alexander.duyck@gmail.com>
+Signed-off-by: Willem de Bruijn <willemb@google.com>
+Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/ipv4/ip_gre.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
+index a8a37d112820..0c431fd4b120 100644
+--- a/net/ipv4/ip_gre.c
++++ b/net/ipv4/ip_gre.c
+@@ -449,8 +449,6 @@ static void __gre_xmit(struct sk_buff *skb, struct net_device *dev,
+ static int gre_handle_offloads(struct sk_buff *skb, bool csum)
+ {
+-      if (csum && skb_checksum_start(skb) < skb->data)
+-              return -EINVAL;
+       return iptunnel_handle_offloads(skb, csum ? SKB_GSO_GRE_CSUM : SKB_GSO_GRE);
+ }
+@@ -682,15 +680,20 @@ static netdev_tx_t ipgre_xmit(struct sk_buff *skb,
+       }
+       if (dev->header_ops) {
++              const int pull_len = tunnel->hlen + sizeof(struct iphdr);
++
+               if (skb_cow_head(skb, 0))
+                       goto free_skb;
+               tnl_params = (const struct iphdr *)skb->data;
++              if (pull_len > skb_transport_offset(skb))
++                      goto free_skb;
++
+               /* Pull skb since ip_tunnel_xmit() needs skb->data pointing
+                * to gre header.
+                */
+-              skb_pull(skb, tunnel->hlen + sizeof(struct iphdr));
++              skb_pull(skb, pull_len);
+               skb_reset_mac_header(skb);
+       } else {
+               if (skb_cow_head(skb, dev->needed_headroom))
+-- 
+2.30.2
+
diff --git a/queue-4.19/kvm-arm64-handle-psci-resets-before-userspace-touche.patch b/queue-4.19/kvm-arm64-handle-psci-resets-before-userspace-touche.patch
new file mode 100644 (file)
index 0000000..251c633
--- /dev/null
@@ -0,0 +1,51 @@
+From 69d85ef15e79cdfe2776f0f684d59b8106b4ee0e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 18 Aug 2021 20:21:31 +0000
+Subject: KVM: arm64: Handle PSCI resets before userspace touches vCPU state
+
+From: Oliver Upton <oupton@google.com>
+
+[ Upstream commit 6826c6849b46aaa91300201213701eb861af4ba0 ]
+
+The CPU_ON PSCI call takes a payload that KVM uses to configure a
+destination vCPU to run. This payload is non-architectural state and not
+exposed through any existing UAPI. Effectively, we have a race between
+CPU_ON and userspace saving/restoring a guest: if the target vCPU isn't
+ran again before the VMM saves its state, the requested PC and context
+ID are lost. When restored, the target vCPU will be runnable and start
+executing at its old PC.
+
+We can avoid this race by making sure the reset payload is serviced
+before userspace can access a vCPU's state.
+
+Fixes: 358b28f09f0a ("arm/arm64: KVM: Allow a VCPU to fully reset itself")
+Signed-off-by: Oliver Upton <oupton@google.com>
+Signed-off-by: Marc Zyngier <maz@kernel.org>
+Link: https://lore.kernel.org/r/20210818202133.1106786-3-oupton@google.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ virt/kvm/arm/arm.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
+index 39706799ecdf..b943ec5345cb 100644
+--- a/virt/kvm/arm/arm.c
++++ b/virt/kvm/arm/arm.c
+@@ -1137,6 +1137,14 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
+               if (copy_from_user(&reg, argp, sizeof(reg)))
+                       break;
++              /*
++               * We could owe a reset due to PSCI. Handle the pending reset
++               * here to ensure userspace register accesses are ordered after
++               * the reset.
++               */
++              if (kvm_check_request(KVM_REQ_VCPU_RESET, vcpu))
++                      kvm_reset_vcpu(vcpu);
++
+               if (ioctl == KVM_SET_ONE_REG)
+                       r = kvm_arm_set_reg(vcpu, &reg);
+               else
+-- 
+2.30.2
+
diff --git a/queue-4.19/mfd-axp20x-update-axp288-volatile-ranges.patch b/queue-4.19/mfd-axp20x-update-axp288-volatile-ranges.patch
new file mode 100644 (file)
index 0000000..6964a1c
--- /dev/null
@@ -0,0 +1,80 @@
+From 054731abda4a56018e722145ac84907afe746507 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 29 Jun 2021 19:12:39 +0200
+Subject: mfd: axp20x: Update AXP288 volatile ranges
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+[ Upstream commit f949a9ebce7a18005266b859a17f10c891bb13d7 ]
+
+On Cherry Trail devices with an AXP288 PMIC the external SD-card slot
+used the AXP's DLDO2 as card-voltage and either DLDO3 or GPIO1LDO
+(GPIO1 pin in low noise LDO mode) as signal-voltage.
+
+These regulators are turned on/off and in case of the signal-voltage
+also have their output-voltage changed by the _PS0 and _PS3 power-
+management ACPI methods on the MMC-controllers ACPI fwnode as well as
+by the _DSM ACPI method for changing the signal voltage.
+
+The AML code implementing these methods is directly accessing the
+PMIC through ACPI I2C OpRegion accesses, instead of using the special
+PMIC OpRegion handled by drivers/acpi/pmic/intel_pmic_xpower.c .
+
+This means that the contents of the involved PMIC registers can change
+without the change being made through the regmap interface, so regmap
+should not cache the contents of these registers.
+
+Mark the regulator power on/off, the regulator voltage control and the
+GPIO1 control registers as volatile, to avoid regmap caching them.
+
+Specifically this fixes an issue on some models where the i915 driver
+toggles another LDO using the same on/off register on/off through
+MIPI sequences (through intel_soc_pmic_exec_mipi_pmic_seq_element())
+which then writes back a cached on/off register-value where the
+card-voltage is off causing the external sdcard slot to stop working
+when the screen goes blank, or comes back on again.
+
+The regulator register-range now marked volatile also includes the
+buck regulator control registers. This is done on purpose these are
+normally not touched by the AML code, but they are updated directly
+by the SoC's PUNIT which means that they may also change without going
+through regmap.
+
+Note the AXP288 PMIC is only used on Bay- and Cherry-Trail platforms,
+so even though this is an ACPI specific problem there is no need to
+make the new volatile ranges conditional since these platforms always
+use ACPI.
+
+Fixes: dc91c3b6fe66 ("mfd: axp20x: Mark AXP20X_VBUS_IPSOUT_MGMT as volatile")
+Fixes: cd53216625a0 ("mfd: axp20x: Fix axp288 volatile ranges")
+Reported-and-tested-by: Clamshell <clamfly@163.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Reviewed-by: Chen-Yu Tsai <wens@csie.org>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/mfd/axp20x.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
+index aa65931142ba..dcb341d62758 100644
+--- a/drivers/mfd/axp20x.c
++++ b/drivers/mfd/axp20x.c
+@@ -127,12 +127,13 @@ static const struct regmap_range axp288_writeable_ranges[] = {
+ static const struct regmap_range axp288_volatile_ranges[] = {
+       regmap_reg_range(AXP20X_PWR_INPUT_STATUS, AXP288_POWER_REASON),
++      regmap_reg_range(AXP22X_PWR_OUT_CTRL1, AXP22X_ALDO3_V_OUT),
+       regmap_reg_range(AXP288_BC_GLOBAL, AXP288_BC_GLOBAL),
+       regmap_reg_range(AXP288_BC_DET_STAT, AXP20X_VBUS_IPSOUT_MGMT),
+       regmap_reg_range(AXP20X_CHRG_BAK_CTRL, AXP20X_CHRG_BAK_CTRL),
+       regmap_reg_range(AXP20X_IRQ1_EN, AXP20X_IPSOUT_V_HIGH_L),
+       regmap_reg_range(AXP20X_TIMER_CTRL, AXP20X_TIMER_CTRL),
+-      regmap_reg_range(AXP22X_GPIO_STATE, AXP22X_GPIO_STATE),
++      regmap_reg_range(AXP20X_GPIO1_CTRL, AXP22X_GPIO_STATE),
+       regmap_reg_range(AXP288_RT_BATT_V_H, AXP288_RT_BATT_V_L),
+       regmap_reg_range(AXP20X_FG_RES, AXP288_FG_CC_CAP_REG),
+ };
+-- 
+2.30.2
+
diff --git a/queue-4.19/mfd-don-t-use-irq_create_mapping-to-resolve-a-mappin.patch b/queue-4.19/mfd-don-t-use-irq_create_mapping-to-resolve-a-mappin.patch
new file mode 100644 (file)
index 0000000..dce1f02
--- /dev/null
@@ -0,0 +1,95 @@
+From d293e510be632bbdbb92dbbcd2e9eadb58e86d6e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 25 Jul 2021 19:07:54 +0100
+Subject: mfd: Don't use irq_create_mapping() to resolve a mapping
+
+From: Marc Zyngier <maz@kernel.org>
+
+[ Upstream commit 9ff80e2de36d0554e3a6da18a171719fe8663c17 ]
+
+Although irq_create_mapping() is able to deal with duplicate
+mappings, it really isn't supposed to be a substitute for
+irq_find_mapping(), and can result in allocations that take place
+in atomic context if the mapping didn't exist.
+
+Fix the handful of MFD drivers that use irq_create_mapping() in
+interrupt context by using irq_find_mapping() instead.
+
+Cc: Linus Walleij <linus.walleij@linaro.org>
+Cc: Lee Jones <lee.jones@linaro.org>
+Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
+Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
+Signed-off-by: Marc Zyngier <maz@kernel.org>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/mfd/ab8500-core.c | 2 +-
+ drivers/mfd/stmpe.c       | 4 ++--
+ drivers/mfd/tc3589x.c     | 2 +-
+ drivers/mfd/wm8994-irq.c  | 2 +-
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
+index 11ab17f64c64..f0527e769867 100644
+--- a/drivers/mfd/ab8500-core.c
++++ b/drivers/mfd/ab8500-core.c
+@@ -493,7 +493,7 @@ static int ab8500_handle_hierarchical_line(struct ab8500 *ab8500,
+               if (line == AB8540_INT_GPIO43F || line == AB8540_INT_GPIO44F)
+                       line += 1;
+-              handle_nested_irq(irq_create_mapping(ab8500->domain, line));
++              handle_nested_irq(irq_find_mapping(ab8500->domain, line));
+       }
+       return 0;
+diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
+index 566caca4efd8..722ad2c368a5 100644
+--- a/drivers/mfd/stmpe.c
++++ b/drivers/mfd/stmpe.c
+@@ -1035,7 +1035,7 @@ static irqreturn_t stmpe_irq(int irq, void *data)
+       if (variant->id_val == STMPE801_ID ||
+           variant->id_val == STMPE1600_ID) {
+-              int base = irq_create_mapping(stmpe->domain, 0);
++              int base = irq_find_mapping(stmpe->domain, 0);
+               handle_nested_irq(base);
+               return IRQ_HANDLED;
+@@ -1063,7 +1063,7 @@ static irqreturn_t stmpe_irq(int irq, void *data)
+               while (status) {
+                       int bit = __ffs(status);
+                       int line = bank * 8 + bit;
+-                      int nestedirq = irq_create_mapping(stmpe->domain, line);
++                      int nestedirq = irq_find_mapping(stmpe->domain, line);
+                       handle_nested_irq(nestedirq);
+                       status &= ~(1 << bit);
+diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c
+index cc9e563f23aa..7062baf60685 100644
+--- a/drivers/mfd/tc3589x.c
++++ b/drivers/mfd/tc3589x.c
+@@ -187,7 +187,7 @@ again:
+       while (status) {
+               int bit = __ffs(status);
+-              int virq = irq_create_mapping(tc3589x->domain, bit);
++              int virq = irq_find_mapping(tc3589x->domain, bit);
+               handle_nested_irq(virq);
+               status &= ~(1 << bit);
+diff --git a/drivers/mfd/wm8994-irq.c b/drivers/mfd/wm8994-irq.c
+index 18710f3b5c53..2c58d9b99a39 100644
+--- a/drivers/mfd/wm8994-irq.c
++++ b/drivers/mfd/wm8994-irq.c
+@@ -159,7 +159,7 @@ static irqreturn_t wm8994_edge_irq(int irq, void *data)
+       struct wm8994 *wm8994 = data;
+       while (gpio_get_value_cansleep(wm8994->pdata.irq_gpio))
+-              handle_nested_irq(irq_create_mapping(wm8994->edge_irq, 0));
++              handle_nested_irq(irq_find_mapping(wm8994->edge_irq, 0));
+       return IRQ_HANDLED;
+ }
+-- 
+2.30.2
+
diff --git a/queue-4.19/mtd-rawnand-cafe-fix-a-resource-leak-in-the-error-ha.patch b/queue-4.19/mtd-rawnand-cafe-fix-a-resource-leak-in-the-error-ha.patch
new file mode 100644 (file)
index 0000000..61eaa9a
--- /dev/null
@@ -0,0 +1,53 @@
+From 158bbd6ae81f821dbc35b14a87081d0e3582389f Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 21 Aug 2021 09:58:45 +0200
+Subject: mtd: rawnand: cafe: Fix a resource leak in the error handling path of
+ 'cafe_nand_probe()'
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+
+[ Upstream commit 6b430c7595e4eb95fae8fb54adc3c3ce002e75ae ]
+
+A successful 'init_rs_non_canonical()' call should be balanced by a
+corresponding 'free_rs()' call in the error handling path of the probe, as
+already done in the remove function.
+
+Update the error handling path accordingly.
+
+Fixes: 8c61b7a7f4d4 ("[MTD] [NAND] Use rslib for CAFÉ ECC")
+Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
+Link: https://lore.kernel.org/linux-mtd/fd313d3fb787458bcc73189e349f481133a2cdc9.1629532640.git.christophe.jaillet@wanadoo.fr
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/mtd/nand/raw/cafe_nand.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/mtd/nand/raw/cafe_nand.c b/drivers/mtd/nand/raw/cafe_nand.c
+index 3304594177c6..1fee298d5680 100644
+--- a/drivers/mtd/nand/raw/cafe_nand.c
++++ b/drivers/mtd/nand/raw/cafe_nand.c
+@@ -758,7 +758,7 @@ static int cafe_nand_probe(struct pci_dev *pdev,
+                         "CAFE NAND", mtd);
+       if (err) {
+               dev_warn(&pdev->dev, "Could not register IRQ %d\n", pdev->irq);
+-              goto out_ior;
++              goto out_free_rs;
+       }
+       /* Disable master reset, enable NAND clock */
+@@ -802,6 +802,8 @@ static int cafe_nand_probe(struct pci_dev *pdev,
+       /* Disable NAND IRQ in global IRQ mask register */
+       cafe_writel(cafe, ~1 & cafe_readl(cafe, GLOBAL_IRQ_MASK), GLOBAL_IRQ_MASK);
+       free_irq(pdev->irq, mtd);
++ out_free_rs:
++      free_rs(cafe->rs);
+  out_ior:
+       pci_iounmap(pdev, cafe->mmio);
+  out_free_mtd:
+-- 
+2.30.2
+
diff --git a/queue-4.19/net-dsa-b53-fix-calculating-number-of-switch-ports.patch b/queue-4.19/net-dsa-b53-fix-calculating-number-of-switch-ports.patch
new file mode 100644 (file)
index 0000000..b074d61
--- /dev/null
@@ -0,0 +1,49 @@
+From 08d7e326228201b12103b772359235fdc137ad61 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 2 Sep 2021 10:30:50 +0200
+Subject: net: dsa: b53: Fix calculating number of switch ports
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Rafał Miłecki <rafal@milecki.pl>
+
+[ Upstream commit cdb067d31c0fe4cce98b9d15f1f2ef525acaa094 ]
+
+It isn't true that CPU port is always the last one. Switches BCM5301x
+have 9 ports (port 6 being inactive) and they use port 5 as CPU by
+default (depending on design some other may be CPU ports too).
+
+A more reliable way of determining number of ports is to check for the
+last set bit in the "enabled_ports" bitfield.
+
+This fixes b53 internal state, it will allow providing accurate info to
+the DSA and is required to fix BCM5301x support.
+
+Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch")
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/dsa/b53/b53_common.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
+index 7eaeab65d39f..451121f47c89 100644
+--- a/drivers/net/dsa/b53/b53_common.c
++++ b/drivers/net/dsa/b53/b53_common.c
+@@ -2135,9 +2135,8 @@ static int b53_switch_init(struct b53_device *dev)
+                       dev->cpu_port = 5;
+       }
+-      /* cpu port is always last */
+-      dev->num_ports = dev->cpu_port + 1;
+       dev->enabled_ports |= BIT(dev->cpu_port);
++      dev->num_ports = fls(dev->enabled_ports);
+       /* Include non standard CPU port built-in PHYs to be probed */
+       if (is539x(dev) || is531x5(dev)) {
+-- 
+2.30.2
+
diff --git a/queue-4.19/net-renesas-sh_eth-fix-freeing-wrong-tx-descriptor.patch b/queue-4.19/net-renesas-sh_eth-fix-freeing-wrong-tx-descriptor.patch
new file mode 100644 (file)
index 0000000..eac06cc
--- /dev/null
@@ -0,0 +1,40 @@
+From 1bc13cdc487c00ca1cf67b6a1edff084514ca0ec Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 7 Sep 2021 20:29:40 +0900
+Subject: net: renesas: sh_eth: Fix freeing wrong tx descriptor
+
+From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
+
+[ Upstream commit 0341d5e3d1ee2a36dd5a49b5bef2ce4ad1cfa6b4 ]
+
+The cur_tx counter must be incremented after TACT bit of
+txdesc->status was set. However, a CPU is possible to reorder
+instructions and/or memory accesses between cur_tx and
+txdesc->status. And then, if TX interrupt happened at such a
+timing, the sh_eth_tx_free() may free the descriptor wrongly.
+So, add wmb() before cur_tx++.
+Otherwise NETDEV WATCHDOG timeout is possible to happen.
+
+Fixes: 86a74ff21a7a ("net: sh_eth: add support for Renesas SuperH Ethernet")
+Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/renesas/sh_eth.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
+index 394ab9cdfe2c..c44aea47c120 100644
+--- a/drivers/net/ethernet/renesas/sh_eth.c
++++ b/drivers/net/ethernet/renesas/sh_eth.c
+@@ -2547,6 +2547,7 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+       else
+               txdesc->status |= cpu_to_le32(TD_TACT);
++      wmb(); /* cur_tx must be incremented after TACT bit was set */
+       mdp->cur_tx++;
+       if (!(sh_eth_read(ndev, EDTRR) & mdp->cd->edtrr_trns))
+-- 
+2.30.2
+
diff --git a/queue-4.19/net-usb-cdc_mbim-avoid-altsetting-toggling-for-telit.patch b/queue-4.19/net-usb-cdc_mbim-avoid-altsetting-toggling-for-telit.patch
new file mode 100644 (file)
index 0000000..52046c7
--- /dev/null
@@ -0,0 +1,38 @@
+From 6c87c3b0a3999253c2455d1fdf3a018918d8f587 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 2 Sep 2021 12:51:22 +0200
+Subject: net: usb: cdc_mbim: avoid altsetting toggling for Telit LN920
+
+From: Daniele Palmas <dnlplm@gmail.com>
+
+[ Upstream commit aabbdc67f3485b5db27ab4eba01e5fbf1ffea62c ]
+
+Add quirk CDC_MBIM_FLAG_AVOID_ALTSETTING_TOGGLE for Telit LN920
+0x1061 composition in order to avoid bind error.
+
+Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/usb/cdc_mbim.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/drivers/net/usb/cdc_mbim.c b/drivers/net/usb/cdc_mbim.c
+index 0362acd5cdca..cdd1b193fd4f 100644
+--- a/drivers/net/usb/cdc_mbim.c
++++ b/drivers/net/usb/cdc_mbim.c
+@@ -655,6 +655,11 @@ static const struct usb_device_id mbim_devs[] = {
+         .driver_info = (unsigned long)&cdc_mbim_info_avoid_altsetting_toggle,
+       },
++      /* Telit LN920 */
++      { USB_DEVICE_AND_INTERFACE_INFO(0x1bc7, 0x1061, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE),
++        .driver_info = (unsigned long)&cdc_mbim_info_avoid_altsetting_toggle,
++      },
++
+       /* default entry */
+       { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE),
+         .driver_info = (unsigned long)&cdc_mbim_info_zlp,
+-- 
+2.30.2
+
diff --git a/queue-4.19/netfilter-socket-icmp6-fix-use-after-scope.patch b/queue-4.19/netfilter-socket-icmp6-fix-use-after-scope.patch
new file mode 100644 (file)
index 0000000..96aaa79
--- /dev/null
@@ -0,0 +1,64 @@
+From cb57c4303cdcf71c0fbfc61eac36c76ce2153082 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 3 Sep 2021 15:23:35 +0200
+Subject: netfilter: socket: icmp6: fix use-after-scope
+
+From: Benjamin Hesmans <benjamin.hesmans@tessares.net>
+
+[ Upstream commit 730affed24bffcd1eebd5903171960f5ff9f1f22 ]
+
+Bug reported by KASAN:
+
+BUG: KASAN: use-after-scope in inet6_ehashfn (net/ipv6/inet6_hashtables.c:40)
+Call Trace:
+(...)
+inet6_ehashfn (net/ipv6/inet6_hashtables.c:40)
+(...)
+nf_sk_lookup_slow_v6 (net/ipv6/netfilter/nf_socket_ipv6.c:91
+net/ipv6/netfilter/nf_socket_ipv6.c:146)
+
+It seems that this bug has already been fixed by Eric Dumazet in the
+past in:
+commit 78296c97ca1f ("netfilter: xt_socket: fix a stack corruption bug")
+
+But a variant of the same issue has been introduced in
+commit d64d80a2cde9 ("netfilter: x_tables: don't extract flow keys on early demuxed sks in socket match")
+
+`daddr` and `saddr` potentially hold a reference to ipv6_var that is no
+longer in scope when the call to `nf_socket_get_sock_v6` is made.
+
+Fixes: d64d80a2cde9 ("netfilter: x_tables: don't extract flow keys on early demuxed sks in socket match")
+Acked-by: Matthieu Baerts <matthieu.baerts@tessares.net>
+Signed-off-by: Benjamin Hesmans <benjamin.hesmans@tessares.net>
+Reviewed-by: Florian Westphal <fw@strlen.de>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/ipv6/netfilter/nf_socket_ipv6.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/net/ipv6/netfilter/nf_socket_ipv6.c b/net/ipv6/netfilter/nf_socket_ipv6.c
+index f14de4b6d639..58e839e2ce1d 100644
+--- a/net/ipv6/netfilter/nf_socket_ipv6.c
++++ b/net/ipv6/netfilter/nf_socket_ipv6.c
+@@ -104,7 +104,7 @@ struct sock *nf_sk_lookup_slow_v6(struct net *net, const struct sk_buff *skb,
+ {
+       __be16 uninitialized_var(dport), uninitialized_var(sport);
+       const struct in6_addr *daddr = NULL, *saddr = NULL;
+-      struct ipv6hdr *iph = ipv6_hdr(skb);
++      struct ipv6hdr *iph = ipv6_hdr(skb), ipv6_var;
+       struct sk_buff *data_skb = NULL;
+       int doff = 0;
+       int thoff = 0, tproto;
+@@ -134,8 +134,6 @@ struct sock *nf_sk_lookup_slow_v6(struct net *net, const struct sk_buff *skb,
+                       thoff + sizeof(*hp);
+       } else if (tproto == IPPROTO_ICMPV6) {
+-              struct ipv6hdr ipv6_var;
+-
+               if (extract_icmp6_fields(skb, thoff, &tproto, &saddr, &daddr,
+                                        &sport, &dport, &ipv6_var))
+                       return NULL;
+-- 
+2.30.2
+
diff --git a/queue-4.19/ntb-perf-fix-an-error-code-in-perf_setup_inbuf.patch b/queue-4.19/ntb-perf-fix-an-error-code-in-perf_setup_inbuf.patch
new file mode 100644 (file)
index 0000000..7259577
--- /dev/null
@@ -0,0 +1,40 @@
+From 1ef3b358eba2455ec6ddc8e29f83bbfc96a05ef0 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 7 Jun 2021 16:40:36 +0800
+Subject: NTB: perf: Fix an error code in perf_setup_inbuf()
+
+From: Yang Li <yang.lee@linux.alibaba.com>
+
+[ Upstream commit 0097ae5f7af5684f961a5f803ff7ad3e6f933668 ]
+
+When the function IS_ALIGNED() returns false, the value of ret is 0.
+So, we set ret to -EINVAL to indicate this error.
+
+Clean up smatch warning:
+drivers/ntb/test/ntb_perf.c:602 perf_setup_inbuf() warn: missing error
+code 'ret'.
+
+Reported-by: Abaci Robot <abaci@linux.alibaba.com>
+Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
+Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
+Signed-off-by: Jon Mason <jdmason@kudzu.us>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/ntb/test/ntb_perf.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
+index ad5d3919435c..87a41d0ededc 100644
+--- a/drivers/ntb/test/ntb_perf.c
++++ b/drivers/ntb/test/ntb_perf.c
+@@ -600,6 +600,7 @@ static int perf_setup_inbuf(struct perf_peer *peer)
+               return -ENOMEM;
+       }
+       if (!IS_ALIGNED(peer->inbuf_xlat, xlat_align)) {
++              ret = -EINVAL;
+               dev_err(&perf->ntb->dev, "Unaligned inbuf allocated\n");
+               goto err_free_inbuf;
+       }
+-- 
+2.30.2
+
diff --git a/queue-4.19/pci-add-acs-quirks-for-cavium-multi-function-devices.patch b/queue-4.19/pci-add-acs-quirks-for-cavium-multi-function-devices.patch
new file mode 100644 (file)
index 0000000..efc2c23
--- /dev/null
@@ -0,0 +1,44 @@
+From 1e3e408e01cdf3849588a07d285000bcc9186f3a Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 10 Aug 2021 17:54:25 +0530
+Subject: PCI: Add ACS quirks for Cavium multi-function devices
+
+From: George Cherian <george.cherian@marvell.com>
+
+[ Upstream commit 32837d8a8f63eb95dcb9cd005524a27f06478832 ]
+
+Some Cavium endpoints are implemented as multi-function devices without ACS
+capability, but they actually don't support peer-to-peer transactions.
+
+Add ACS quirks to declare DMA isolation for the following devices:
+
+  - BGX device found on Octeon-TX (8xxx)
+  - CGX device found on Octeon-TX2 (9xxx)
+  - RPM device found on Octeon-TX3 (10xxx)
+
+Link: https://lore.kernel.org/r/20210810122425.1115156-1-george.cherian@marvell.com
+Signed-off-by: George Cherian <george.cherian@marvell.com>
+Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/pci/quirks.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
+index 48c1fbb17e40..4eb8900b9a5c 100644
+--- a/drivers/pci/quirks.c
++++ b/drivers/pci/quirks.c
+@@ -4778,6 +4778,10 @@ static const struct pci_dev_acs_enabled {
+       { 0x10df, 0x720, pci_quirk_mf_endpoint_acs }, /* Emulex Skyhawk-R */
+       /* Cavium ThunderX */
+       { PCI_VENDOR_ID_CAVIUM, PCI_ANY_ID, pci_quirk_cavium_acs },
++      /* Cavium multi-function devices */
++      { PCI_VENDOR_ID_CAVIUM, 0xA026, pci_quirk_mf_endpoint_acs },
++      { PCI_VENDOR_ID_CAVIUM, 0xA059, pci_quirk_mf_endpoint_acs },
++      { PCI_VENDOR_ID_CAVIUM, 0xA060, pci_quirk_mf_endpoint_acs },
+       /* APM X-Gene */
+       { PCI_VENDOR_ID_AMCC, 0xE004, pci_quirk_xgene_acs },
+       /* Ampere Computing */
+-- 
+2.30.2
+
diff --git a/queue-4.19/pci-fix-pci_dev_str_match_path-alloc-while-atomic-bu.patch b/queue-4.19/pci-fix-pci_dev_str_match_path-alloc-while-atomic-bu.patch
new file mode 100644 (file)
index 0000000..602d73a
--- /dev/null
@@ -0,0 +1,42 @@
+From 2b209ba05256ab22199957b3410f5183c772d95d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 12 Aug 2021 10:00:04 +0300
+Subject: PCI: Fix pci_dev_str_match_path() alloc while atomic bug
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+[ Upstream commit 7eb6ea4148579b85540a41d57bcec315b8af8ff8 ]
+
+pci_dev_str_match_path() is often called with a spinlock held so the
+allocation has to be atomic.  The call tree is:
+
+  pci_specified_resource_alignment() <-- takes spin_lock();
+    pci_dev_str_match()
+      pci_dev_str_match_path()
+
+Fixes: 45db33709ccc ("PCI: Allow specifying devices using a base bus and path of devfns")
+Link: https://lore.kernel.org/r/20210812070004.GC31863@kili
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
+Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/pci/pci.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
+index 077cc0512dd2..97d69b9be1d4 100644
+--- a/drivers/pci/pci.c
++++ b/drivers/pci/pci.c
+@@ -224,7 +224,7 @@ static int pci_dev_str_match_path(struct pci_dev *dev, const char *path,
+       *endptr = strchrnul(path, ';');
+-      wpath = kmemdup_nul(path, *endptr - path, GFP_KERNEL);
++      wpath = kmemdup_nul(path, *endptr - path, GFP_ATOMIC);
+       if (!wpath)
+               return -ENOMEM;
+-- 
+2.30.2
+
diff --git a/queue-4.19/pci-sync-__pci_register_driver-stub-for-config_pci-n.patch b/queue-4.19/pci-sync-__pci_register_driver-stub-for-config_pci-n.patch
new file mode 100644 (file)
index 0000000..a2a0b4b
--- /dev/null
@@ -0,0 +1,42 @@
+From 3abaae2413b8c55b8fecadc3c840c38c1784da96 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 13 Aug 2021 18:36:19 +0300
+Subject: PCI: Sync __pci_register_driver() stub for CONFIG_PCI=n
+
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+
+[ Upstream commit 817f9916a6e96ae43acdd4e75459ef4f92d96eb1 ]
+
+The CONFIG_PCI=y case got a new parameter long time ago.  Sync the stub as
+well.
+
+[bhelgaas: add parameter names]
+Fixes: 725522b5453d ("PCI: add the sysfs driver name to all modules")
+Link: https://lore.kernel.org/r/20210813153619.89574-1-andriy.shevchenko@linux.intel.com
+Reported-by: kernel test robot <lkp@intel.com>
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/linux/pci.h | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/include/linux/pci.h b/include/linux/pci.h
+index 2fda9893962d..6f9ca2f278b3 100644
+--- a/include/linux/pci.h
++++ b/include/linux/pci.h
+@@ -1644,8 +1644,9 @@ static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; }
+ static inline void pci_disable_device(struct pci_dev *dev) { }
+ static inline int pci_assign_resource(struct pci_dev *dev, int i)
+ { return -EBUSY; }
+-static inline int __pci_register_driver(struct pci_driver *drv,
+-                                      struct module *owner)
++static inline int __must_check __pci_register_driver(struct pci_driver *drv,
++                                                   struct module *owner,
++                                                   const char *mod_name)
+ { return 0; }
+ static inline int pci_register_driver(struct pci_driver *drv)
+ { return 0; }
+-- 
+2.30.2
+
diff --git a/queue-4.19/qlcnic-remove-redundant-unlock-in-qlcnic_pinit_from_.patch b/queue-4.19/qlcnic-remove-redundant-unlock-in-qlcnic_pinit_from_.patch
new file mode 100644 (file)
index 0000000..74fed6e
--- /dev/null
@@ -0,0 +1,38 @@
+From 07f6df940c728a441966a0100ccc593fa7ccdaa5 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 3 Sep 2021 15:35:43 +0800
+Subject: qlcnic: Remove redundant unlock in qlcnic_pinit_from_rom
+
+From: Dinghao Liu <dinghao.liu@zju.edu.cn>
+
+[ Upstream commit 9ddbc2a00d7f63fa9748f4278643193dac985f2d ]
+
+Previous commit 68233c583ab4 removes the qlcnic_rom_lock()
+in qlcnic_pinit_from_rom(), but remains its corresponding
+unlock function, which is odd. I'm not very sure whether the
+lock is missing, or the unlock is redundant. This bug is
+suggested by a static analysis tool, please advise.
+
+Fixes: 68233c583ab4 ("qlcnic: updated reset sequence")
+Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c
+index c48a0e2d4d7e..6a009d51ec51 100644
+--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c
++++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c
+@@ -440,7 +440,6 @@ int qlcnic_pinit_from_rom(struct qlcnic_adapter *adapter)
+       QLCWR32(adapter, QLCNIC_CRB_PEG_NET_4 + 0x3c, 1);
+       msleep(20);
+-      qlcnic_rom_unlock(adapter);
+       /* big hammer don't reset CAM block on reset */
+       QLCWR32(adapter, QLCNIC_ROMUSB_GLB_SW_RESET, 0xfeffffff);
+-- 
+2.30.2
+
index eaeb41b428af8e29888fdef69682ff7c77a43d86..ede42a5bcc8952f200dc61ac64405cdfc21b5703 100644 (file)
@@ -272,3 +272,22 @@ ibmvnic-check-failover_pending-in-login-response.patch
 net-hns3-pad-the-short-tunnel-frame-before-sending-to-hardware.patch
 mm-memory_hotplug-use-unsigned-long-for-pfn-in-zone_for_pfn_range.patch
 kvm-s390-index-kvm-arch.idle_mask-by-vcpu_idx.patch
+dt-bindings-mtd-gpmc-fix-the-ecc-bytes-vs.-oob-bytes.patch
+mfd-don-t-use-irq_create_mapping-to-resolve-a-mappin.patch
+pci-add-acs-quirks-for-cavium-multi-function-devices.patch
+net-usb-cdc_mbim-avoid-altsetting-toggling-for-telit.patch
+block-bfq-honor-already-setup-queue-merges.patch
+ethtool-fix-an-error-code-in-cxgb2.c.patch
+ntb-perf-fix-an-error-code-in-perf_setup_inbuf.patch
+mfd-axp20x-update-axp288-volatile-ranges.patch
+pci-fix-pci_dev_str_match_path-alloc-while-atomic-bu.patch
+kvm-arm64-handle-psci-resets-before-userspace-touche.patch
+pci-sync-__pci_register_driver-stub-for-config_pci-n.patch
+mtd-rawnand-cafe-fix-a-resource-leak-in-the-error-ha.patch
+arc-export-clear_user_page-for-modules.patch
+net-dsa-b53-fix-calculating-number-of-switch-ports.patch
+netfilter-socket-icmp6-fix-use-after-scope.patch
+fq_codel-reject-silly-quantum-parameters.patch
+qlcnic-remove-redundant-unlock-in-qlcnic_pinit_from_.patch
+ip_gre-validate-csum_start-only-on-pull.patch
+net-renesas-sh_eth-fix-freeing-wrong-tx-descriptor.patch