]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.14
authorSasha Levin <sashal@kernel.org>
Sun, 22 Aug 2021 02:39:21 +0000 (22:39 -0400)
committerSasha Levin <sashal@kernel.org>
Sun, 22 Aug 2021 02:39:21 +0000 (22:39 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.14/bnxt-don-t-lock-the-tx-queue-from-napi-poll.patch [new file with mode: 0644]
queue-4.14/dccp-add-do-while-0-stubs-for-dccp_pr_debug-macros.patch [new file with mode: 0644]
queue-4.14/net-6pack-fix-slab-out-of-bounds-in-decode_data.patch [new file with mode: 0644]
queue-4.14/net-mdio-mux-don-t-ignore-memory-allocation-errors.patch [new file with mode: 0644]
queue-4.14/net-mdio-mux-handle-eprobe_defer-correctly.patch [new file with mode: 0644]
queue-4.14/net-qlcnic-add-missed-unlock-in-qlcnic_83xx_flash_re.patch [new file with mode: 0644]
queue-4.14/ptp_pch-restore-dependency-on-pci.patch [new file with mode: 0644]
queue-4.14/series
queue-4.14/vhost-fix-the-calculation-in-vhost_overflow.patch [new file with mode: 0644]

diff --git a/queue-4.14/bnxt-don-t-lock-the-tx-queue-from-napi-poll.patch b/queue-4.14/bnxt-don-t-lock-the-tx-queue-from-napi-poll.patch
new file mode 100644 (file)
index 0000000..0b3dc25
--- /dev/null
@@ -0,0 +1,141 @@
+From 9a14c6205ddef0c7b4f22960c757ffa23f17ab74 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 12 Aug 2021 14:42:39 -0700
+Subject: bnxt: don't lock the tx queue from napi poll
+
+From: Jakub Kicinski <kuba@kernel.org>
+
+[ Upstream commit 3c603136c9f82833813af77185618de5af67676c ]
+
+We can't take the tx lock from the napi poll routine, because
+netpoll can poll napi at any moment, including with the tx lock
+already held.
+
+The tx lock is protecting against two paths - the disable
+path, and (as Michael points out) the NETDEV_TX_BUSY case
+which may occur if NAPI completions race with start_xmit
+and both decide to re-enable the queue.
+
+For the disable/ifdown path use synchronize_net() to make sure
+closing the device does not race we restarting the queues.
+Annotate accesses to dev_state against data races.
+
+For the NAPI cleanup vs start_xmit path - appropriate barriers
+are already in place in the main spot where Tx queue is stopped
+but we need to do the same careful dance in the TX_BUSY case.
+
+Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.")
+Reviewed-by: Michael Chan <michael.chan@broadcom.com>
+Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/broadcom/bnxt/bnxt.c | 54 ++++++++++++++---------
+ 1 file changed, 32 insertions(+), 22 deletions(-)
+
+diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+index 9135c3eccb58..c4b0c35a270c 100644
+--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
++++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+@@ -266,6 +266,26 @@ static u16 bnxt_xmit_get_cfa_action(struct sk_buff *skb)
+       return md_dst->u.port_info.port_id;
+ }
++static bool bnxt_txr_netif_try_stop_queue(struct bnxt *bp,
++                                        struct bnxt_tx_ring_info *txr,
++                                        struct netdev_queue *txq)
++{
++      netif_tx_stop_queue(txq);
++
++      /* netif_tx_stop_queue() must be done before checking
++       * tx index in bnxt_tx_avail() below, because in
++       * bnxt_tx_int(), we update tx index before checking for
++       * netif_tx_queue_stopped().
++       */
++      smp_mb();
++      if (bnxt_tx_avail(bp, txr) > bp->tx_wake_thresh) {
++              netif_tx_wake_queue(txq);
++              return false;
++      }
++
++      return true;
++}
++
+ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+       struct bnxt *bp = netdev_priv(dev);
+@@ -293,8 +313,8 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
+       free_size = bnxt_tx_avail(bp, txr);
+       if (unlikely(free_size < skb_shinfo(skb)->nr_frags + 2)) {
+-              netif_tx_stop_queue(txq);
+-              return NETDEV_TX_BUSY;
++              if (bnxt_txr_netif_try_stop_queue(bp, txr, txq))
++                      return NETDEV_TX_BUSY;
+       }
+       length = skb->len;
+@@ -505,16 +525,7 @@ tx_done:
+               if (skb->xmit_more && !tx_buf->is_push)
+                       bnxt_db_write(bp, txr->tx_doorbell, DB_KEY_TX | prod);
+-              netif_tx_stop_queue(txq);
+-
+-              /* netif_tx_stop_queue() must be done before checking
+-               * tx index in bnxt_tx_avail() below, because in
+-               * bnxt_tx_int(), we update tx index before checking for
+-               * netif_tx_queue_stopped().
+-               */
+-              smp_mb();
+-              if (bnxt_tx_avail(bp, txr) > bp->tx_wake_thresh)
+-                      netif_tx_wake_queue(txq);
++              bnxt_txr_netif_try_stop_queue(bp, txr, txq);
+       }
+       return NETDEV_TX_OK;
+@@ -598,14 +609,9 @@ next_tx_int:
+       smp_mb();
+       if (unlikely(netif_tx_queue_stopped(txq)) &&
+-          (bnxt_tx_avail(bp, txr) > bp->tx_wake_thresh)) {
+-              __netif_tx_lock(txq, smp_processor_id());
+-              if (netif_tx_queue_stopped(txq) &&
+-                  bnxt_tx_avail(bp, txr) > bp->tx_wake_thresh &&
+-                  txr->dev_state != BNXT_DEV_STATE_CLOSING)
+-                      netif_tx_wake_queue(txq);
+-              __netif_tx_unlock(txq);
+-      }
++          bnxt_tx_avail(bp, txr) > bp->tx_wake_thresh &&
++          READ_ONCE(txr->dev_state) != BNXT_DEV_STATE_CLOSING)
++              netif_tx_wake_queue(txq);
+ }
+ static struct page *__bnxt_alloc_rx_page(struct bnxt *bp, dma_addr_t *mapping,
+@@ -5748,9 +5754,11 @@ void bnxt_tx_disable(struct bnxt *bp)
+       if (bp->tx_ring) {
+               for (i = 0; i < bp->tx_nr_rings; i++) {
+                       txr = &bp->tx_ring[i];
+-                      txr->dev_state = BNXT_DEV_STATE_CLOSING;
++                      WRITE_ONCE(txr->dev_state, BNXT_DEV_STATE_CLOSING);
+               }
+       }
++      /* Make sure napi polls see @dev_state change */
++      synchronize_net();
+       /* Drop carrier first to prevent TX timeout */
+       netif_carrier_off(bp->dev);
+       /* Stop all TX queues */
+@@ -5764,8 +5772,10 @@ void bnxt_tx_enable(struct bnxt *bp)
+       for (i = 0; i < bp->tx_nr_rings; i++) {
+               txr = &bp->tx_ring[i];
+-              txr->dev_state = 0;
++              WRITE_ONCE(txr->dev_state, 0);
+       }
++      /* Make sure napi polls see @dev_state change */
++      synchronize_net();
+       netif_tx_wake_all_queues(bp->dev);
+       if (bp->link_info.link_up)
+               netif_carrier_on(bp->dev);
+-- 
+2.30.2
+
diff --git a/queue-4.14/dccp-add-do-while-0-stubs-for-dccp_pr_debug-macros.patch b/queue-4.14/dccp-add-do-while-0-stubs-for-dccp_pr_debug-macros.patch
new file mode 100644 (file)
index 0000000..3f0a6c6
--- /dev/null
@@ -0,0 +1,54 @@
+From aaaa81db1a00af24c779eb6e3bb9dbff90373533 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 8 Aug 2021 16:04:40 -0700
+Subject: dccp: add do-while-0 stubs for dccp_pr_debug macros
+
+From: Randy Dunlap <rdunlap@infradead.org>
+
+[ Upstream commit 86aab09a4870bb8346c9579864588c3d7f555299 ]
+
+GCC complains about empty macros in an 'if' statement, so convert
+them to 'do {} while (0)' macros.
+
+Fixes these build warnings:
+
+net/dccp/output.c: In function 'dccp_xmit_packet':
+../net/dccp/output.c:283:71: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
+  283 |                 dccp_pr_debug("transmit_skb() returned err=%d\n", err);
+net/dccp/ackvec.c: In function 'dccp_ackvec_update_old':
+../net/dccp/ackvec.c:163:80: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
+  163 |                                               (unsigned long long)seqno, state);
+
+Fixes: dc841e30eaea ("dccp: Extend CCID packet dequeueing interface")
+Fixes: 380240864451 ("dccp ccid-2: Update code for the Ack Vector input/registration routine")
+Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
+Cc: dccp@vger.kernel.org
+Cc: "David S. Miller" <davem@davemloft.net>
+Cc: Jakub Kicinski <kuba@kernel.org>
+Cc: Gerrit Renker <gerrit@erg.abdn.ac.uk>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/dccp/dccp.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
+index 0c55ffb859bf..121aa71fcb5c 100644
+--- a/net/dccp/dccp.h
++++ b/net/dccp/dccp.h
+@@ -44,9 +44,9 @@ extern bool dccp_debug;
+ #define dccp_pr_debug_cat(format, a...)   DCCP_PRINTK(dccp_debug, format, ##a)
+ #define dccp_debug(fmt, a...)           dccp_pr_debug_cat(KERN_DEBUG fmt, ##a)
+ #else
+-#define dccp_pr_debug(format, a...)
+-#define dccp_pr_debug_cat(format, a...)
+-#define dccp_debug(format, a...)
++#define dccp_pr_debug(format, a...)     do {} while (0)
++#define dccp_pr_debug_cat(format, a...)         do {} while (0)
++#define dccp_debug(format, a...)        do {} while (0)
+ #endif
+ extern struct inet_hashinfo dccp_hashinfo;
+-- 
+2.30.2
+
diff --git a/queue-4.14/net-6pack-fix-slab-out-of-bounds-in-decode_data.patch b/queue-4.14/net-6pack-fix-slab-out-of-bounds-in-decode_data.patch
new file mode 100644 (file)
index 0000000..4620812
--- /dev/null
@@ -0,0 +1,67 @@
+From ca702fc831c61fb6b966634964a7f8d970b33a93 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 13 Aug 2021 18:14:33 +0300
+Subject: net: 6pack: fix slab-out-of-bounds in decode_data
+
+From: Pavel Skripkin <paskripkin@gmail.com>
+
+[ Upstream commit 19d1532a187669ce86d5a2696eb7275310070793 ]
+
+Syzbot reported slab-out-of bounds write in decode_data().
+The problem was in missing validation checks.
+
+Syzbot's reproducer generated malicious input, which caused
+decode_data() to be called a lot in sixpack_decode(). Since
+rx_count_cooked is only 400 bytes and noone reported before,
+that 400 bytes is not enough, let's just check if input is malicious
+and complain about buffer overrun.
+
+Fail log:
+==================================================================
+BUG: KASAN: slab-out-of-bounds in drivers/net/hamradio/6pack.c:843
+Write of size 1 at addr ffff888087c5544e by task kworker/u4:0/7
+
+CPU: 0 PID: 7 Comm: kworker/u4:0 Not tainted 5.6.0-rc3-syzkaller #0
+...
+Workqueue: events_unbound flush_to_ldisc
+Call Trace:
+ __dump_stack lib/dump_stack.c:77 [inline]
+ dump_stack+0x197/0x210 lib/dump_stack.c:118
+ print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374
+ __kasan_report.cold+0x1b/0x32 mm/kasan/report.c:506
+ kasan_report+0x12/0x20 mm/kasan/common.c:641
+ __asan_report_store1_noabort+0x17/0x20 mm/kasan/generic_report.c:137
+ decode_data.part.0+0x23b/0x270 drivers/net/hamradio/6pack.c:843
+ decode_data drivers/net/hamradio/6pack.c:965 [inline]
+ sixpack_decode drivers/net/hamradio/6pack.c:968 [inline]
+
+Reported-and-tested-by: syzbot+fc8cd9a673d4577fb2e4@syzkaller.appspotmail.com
+Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
+Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
+Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/hamradio/6pack.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
+index 6d4742d10a78..231eaef29266 100644
+--- a/drivers/net/hamradio/6pack.c
++++ b/drivers/net/hamradio/6pack.c
+@@ -870,6 +870,12 @@ static void decode_data(struct sixpack *sp, unsigned char inbyte)
+               return;
+       }
++      if (sp->rx_count_cooked + 2 >= sizeof(sp->cooked_buf)) {
++              pr_err("6pack: cooked buffer overrun, data loss\n");
++              sp->rx_count = 0;
++              return;
++      }
++
+       buf = sp->raw_buf;
+       sp->cooked_buf[sp->rx_count_cooked++] =
+               buf[0] | ((buf[1] << 2) & 0xc0);
+-- 
+2.30.2
+
diff --git a/queue-4.14/net-mdio-mux-don-t-ignore-memory-allocation-errors.patch b/queue-4.14/net-mdio-mux-don-t-ignore-memory-allocation-errors.patch
new file mode 100644 (file)
index 0000000..2ddf002
--- /dev/null
@@ -0,0 +1,96 @@
+From bf063971bf4c7aa2f80dde70ba7bdf048a932691 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 17 Aug 2021 20:38:02 -0700
+Subject: net: mdio-mux: Don't ignore memory allocation errors
+
+From: Saravana Kannan <saravanak@google.com>
+
+[ Upstream commit 99d81e942474cc7677d12f673f42a7ea699e2589 ]
+
+If we are seeing memory allocation errors, don't try to continue
+registering child mdiobus devices. It's unlikely they'll succeed.
+
+Fixes: 342fa1964439 ("mdio: mux: make child bus walking more permissive and errors more verbose")
+Signed-off-by: Saravana Kannan <saravanak@google.com>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Acked-by: Marc Zyngier <maz@kernel.org>
+Tested-by: Marc Zyngier <maz@kernel.org>
+Acked-by: Kevin Hilman <khilman@baylibre.com>
+Tested-by: Kevin Hilman <khilman@baylibre.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/phy/mdio-mux.c | 28 ++++++++++++++++++----------
+ 1 file changed, 18 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c
+index 0a86f1e4c02f..bb7e3f12a003 100644
+--- a/drivers/net/phy/mdio-mux.c
++++ b/drivers/net/phy/mdio-mux.c
+@@ -85,6 +85,17 @@ out:
+ static int parent_count;
++static void mdio_mux_uninit_children(struct mdio_mux_parent_bus *pb)
++{
++      struct mdio_mux_child_bus *cb = pb->children;
++
++      while (cb) {
++              mdiobus_unregister(cb->mii_bus);
++              mdiobus_free(cb->mii_bus);
++              cb = cb->next;
++      }
++}
++
+ int mdio_mux_init(struct device *dev,
+                 struct device_node *mux_node,
+                 int (*switch_fn)(int cur, int desired, void *data),
+@@ -147,7 +158,7 @@ int mdio_mux_init(struct device *dev,
+               cb = devm_kzalloc(dev, sizeof(*cb), GFP_KERNEL);
+               if (!cb) {
+                       ret_val = -ENOMEM;
+-                      continue;
++                      goto err_loop;
+               }
+               cb->bus_number = v;
+               cb->parent = pb;
+@@ -155,8 +166,7 @@ int mdio_mux_init(struct device *dev,
+               cb->mii_bus = mdiobus_alloc();
+               if (!cb->mii_bus) {
+                       ret_val = -ENOMEM;
+-                      devm_kfree(dev, cb);
+-                      continue;
++                      goto err_loop;
+               }
+               cb->mii_bus->priv = cb;
+@@ -185,6 +195,10 @@ int mdio_mux_init(struct device *dev,
+       dev_err(dev, "Error: No acceptable child buses found\n");
+       devm_kfree(dev, pb);
++
++err_loop:
++      mdio_mux_uninit_children(pb);
++      of_node_put(child_bus_node);
+ err_pb_kz:
+       put_device(&parent_bus->dev);
+ err_parent_bus:
+@@ -196,14 +210,8 @@ EXPORT_SYMBOL_GPL(mdio_mux_init);
+ void mdio_mux_uninit(void *mux_handle)
+ {
+       struct mdio_mux_parent_bus *pb = mux_handle;
+-      struct mdio_mux_child_bus *cb = pb->children;
+-
+-      while (cb) {
+-              mdiobus_unregister(cb->mii_bus);
+-              mdiobus_free(cb->mii_bus);
+-              cb = cb->next;
+-      }
++      mdio_mux_uninit_children(pb);
+       put_device(&pb->mii_bus->dev);
+ }
+ EXPORT_SYMBOL_GPL(mdio_mux_uninit);
+-- 
+2.30.2
+
diff --git a/queue-4.14/net-mdio-mux-handle-eprobe_defer-correctly.patch b/queue-4.14/net-mdio-mux-handle-eprobe_defer-correctly.patch
new file mode 100644 (file)
index 0000000..033638f
--- /dev/null
@@ -0,0 +1,58 @@
+From 6ccc3b966adfb189103331563df4e9795176e960 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 17 Aug 2021 20:38:03 -0700
+Subject: net: mdio-mux: Handle -EPROBE_DEFER correctly
+
+From: Saravana Kannan <saravanak@google.com>
+
+[ Upstream commit 7bd0cef5dac685f09ef8b0b2a7748ff42d284dc7 ]
+
+When registering mdiobus children, if we get an -EPROBE_DEFER, we shouldn't
+ignore it and continue registering the rest of the mdiobus children. This
+would permanently prevent the deferring child mdiobus from working instead
+of reattempting it in the future. So, if a child mdiobus needs to be
+reattempted in the future, defer the entire mdio-mux initialization.
+
+This fixes the issue where PHYs sitting under the mdio-mux aren't
+initialized correctly if the PHY's interrupt controller is not yet ready
+when the mdio-mux is being probed. Additional context in the link below.
+
+Fixes: 0ca2997d1452 ("netdev/of/phy: Add MDIO bus multiplexer support.")
+Link: https://lore.kernel.org/lkml/CAGETcx95kHrv8wA-O+-JtfH7H9biJEGJtijuPVN0V5dUKUAB3A@mail.gmail.com/#t
+Signed-off-by: Saravana Kannan <saravanak@google.com>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Acked-by: Marc Zyngier <maz@kernel.org>
+Tested-by: Marc Zyngier <maz@kernel.org>
+Acked-by: Kevin Hilman <khilman@baylibre.com>
+Tested-by: Kevin Hilman <khilman@baylibre.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/phy/mdio-mux.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c
+index bb7e3f12a003..c16f875ed9ea 100644
+--- a/drivers/net/phy/mdio-mux.c
++++ b/drivers/net/phy/mdio-mux.c
+@@ -178,11 +178,15 @@ int mdio_mux_init(struct device *dev,
+               cb->mii_bus->write = mdio_mux_write;
+               r = of_mdiobus_register(cb->mii_bus, child_bus_node);
+               if (r) {
++                      mdiobus_free(cb->mii_bus);
++                      if (r == -EPROBE_DEFER) {
++                              ret_val = r;
++                              goto err_loop;
++                      }
++                      devm_kfree(dev, cb);
+                       dev_err(dev,
+                               "Error: Failed to register MDIO bus for child %pOF\n",
+                               child_bus_node);
+-                      mdiobus_free(cb->mii_bus);
+-                      devm_kfree(dev, cb);
+               } else {
+                       cb->next = pb->children;
+                       pb->children = cb;
+-- 
+2.30.2
+
diff --git a/queue-4.14/net-qlcnic-add-missed-unlock-in-qlcnic_83xx_flash_re.patch b/queue-4.14/net-qlcnic-add-missed-unlock-in-qlcnic_83xx_flash_re.patch
new file mode 100644 (file)
index 0000000..1bd0a62
--- /dev/null
@@ -0,0 +1,42 @@
+From 3ee0fb9277b52633190e42d259b8cd73366ae84d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 16 Aug 2021 21:14:04 +0800
+Subject: net: qlcnic: add missed unlock in qlcnic_83xx_flash_read32
+
+From: Dinghao Liu <dinghao.liu@zju.edu.cn>
+
+[ Upstream commit 0a298d133893c72c96e2156ed7cb0f0c4a306a3e ]
+
+qlcnic_83xx_unlock_flash() is called on all paths after we call
+qlcnic_83xx_lock_flash(), except for one error path on failure
+of QLCRD32(), which may cause a deadlock. This bug is suggested
+by a static analysis tool, please advise.
+
+Fixes: 81d0aeb0a4fff ("qlcnic: flash template based firmware reset recovery")
+Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
+Link: https://lore.kernel.org/r/20210816131405.24024-1-dinghao.liu@zju.edu.cn
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
+index aae81226a0a4..4994599728dc 100644
+--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
++++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
+@@ -3157,8 +3157,10 @@ int qlcnic_83xx_flash_read32(struct qlcnic_adapter *adapter, u32 flash_addr,
+               indirect_addr = QLC_83XX_FLASH_DIRECT_DATA(addr);
+               ret = QLCRD32(adapter, indirect_addr, &err);
+-              if (err == -EIO)
++              if (err == -EIO) {
++                      qlcnic_83xx_unlock_flash(adapter);
+                       return err;
++              }
+               word = ret;
+               *(u32 *)p_data  = word;
+-- 
+2.30.2
+
diff --git a/queue-4.14/ptp_pch-restore-dependency-on-pci.patch b/queue-4.14/ptp_pch-restore-dependency-on-pci.patch
new file mode 100644 (file)
index 0000000..5ac839a
--- /dev/null
@@ -0,0 +1,38 @@
+From f576777fdd2d0886ab02fc86f292a9d95ee5dc6a Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 13 Aug 2021 20:33:27 +0300
+Subject: ptp_pch: Restore dependency on PCI
+
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+
+[ Upstream commit 55c8fca1dae1fb0d11deaa21b65a647dedb1bc50 ]
+
+During the swap dependency on PCH_GBE to selection PTP_1588_CLOCK_PCH
+incidentally dropped the implicit dependency on the PCI. Restore it.
+
+Fixes: 18d359ceb044 ("pch_gbe, ptp_pch: Fix the dependency direction between these drivers")
+Reported-by: kernel test robot <lkp@intel.com>
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/ptp/Kconfig | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig
+index a21ad10d613c..a8b4ca17208d 100644
+--- a/drivers/ptp/Kconfig
++++ b/drivers/ptp/Kconfig
+@@ -91,7 +91,8 @@ config DP83640_PHY
+ config PTP_1588_CLOCK_PCH
+       tristate "Intel PCH EG20T as PTP clock"
+       depends on X86_32 || COMPILE_TEST
+-      depends on HAS_IOMEM && NET
++      depends on HAS_IOMEM && PCI
++      depends on NET
+       imply PTP_1588_CLOCK
+       help
+         This driver adds support for using the PCH EG20T as a PTP
+-- 
+2.30.2
+
index a470d87695cec3b5f5ec6d20865b05f1a840dc7f..62eac3bdfbff1b2cc647361ed03402f728c19dd6 100644 (file)
@@ -45,3 +45,11 @@ scsi-core-avoid-printing-an-error-if-target_alloc-re.patch
 arm-dts-nomadik-fix-up-interrupt-controller-node-nam.patch
 net-usb-lan78xx-don-t-modify-phy_device-state-concur.patch
 bluetooth-hidp-use-correct-wait-queue-when-removing-.patch
+dccp-add-do-while-0-stubs-for-dccp_pr_debug-macros.patch
+vhost-fix-the-calculation-in-vhost_overflow.patch
+bnxt-don-t-lock-the-tx-queue-from-napi-poll.patch
+net-6pack-fix-slab-out-of-bounds-in-decode_data.patch
+ptp_pch-restore-dependency-on-pci.patch
+net-qlcnic-add-missed-unlock-in-qlcnic_83xx_flash_re.patch
+net-mdio-mux-don-t-ignore-memory-allocation-errors.patch
+net-mdio-mux-handle-eprobe_defer-correctly.patch
diff --git a/queue-4.14/vhost-fix-the-calculation-in-vhost_overflow.patch b/queue-4.14/vhost-fix-the-calculation-in-vhost_overflow.patch
new file mode 100644 (file)
index 0000000..a76004b
--- /dev/null
@@ -0,0 +1,49 @@
+From 20962e9d59f9fcc429bb717462769ce0edc77063 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 28 Jul 2021 21:07:56 +0800
+Subject: vhost: Fix the calculation in vhost_overflow()
+
+From: Xie Yongji <xieyongji@bytedance.com>
+
+[ Upstream commit f7ad318ea0ad58ebe0e595e59aed270bb643b29b ]
+
+This fixes the incorrect calculation for integer overflow
+when the last address of iova range is 0xffffffff.
+
+Fixes: ec33d031a14b ("vhost: detect 32 bit integer wrap around")
+Reported-by: Jason Wang <jasowang@redhat.com>
+Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
+Acked-by: Jason Wang <jasowang@redhat.com>
+Link: https://lore.kernel.org/r/20210728130756.97-2-xieyongji@bytedance.com
+Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/vhost/vhost.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
+index 4b5590f4e98b..93cdeb516594 100644
+--- a/drivers/vhost/vhost.c
++++ b/drivers/vhost/vhost.c
+@@ -685,10 +685,16 @@ static int log_access_ok(void __user *log_base, u64 addr, unsigned long sz)
+                        (sz + VHOST_PAGE_SIZE * 8 - 1) / VHOST_PAGE_SIZE / 8);
+ }
++/* Make sure 64 bit math will not overflow. */
+ static bool vhost_overflow(u64 uaddr, u64 size)
+ {
+-      /* Make sure 64 bit math will not overflow. */
+-      return uaddr > ULONG_MAX || size > ULONG_MAX || uaddr > ULONG_MAX - size;
++      if (uaddr > ULONG_MAX || size > ULONG_MAX)
++              return true;
++
++      if (!size)
++              return false;
++
++      return uaddr > ULONG_MAX - size + 1;
+ }
+ /* Caller should have vq mutex and device mutex. */
+-- 
+2.30.2
+