]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Mar 2021 13:04:25 +0000 (14:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Mar 2021 13:04:25 +0000 (14:04 +0100)
added patches:
cipso-calipso-resolve-a-number-of-problems-with-the-doi-refcounts.patch
net-davicom-fix-regulator-not-turned-off-on-driver-removal.patch
net-davicom-fix-regulator-not-turned-off-on-failed-probe.patch
net-lapbether-remove-netif_start_queue-netif_stop_queue.patch
net-qrtr-fix-error-return-code-of-qrtr_sendmsg.patch
net-sched-avoid-duplicates-in-classes-dump.patch
net-stmmac-fix-watchdog-timeout-during-suspend-resume-stress-test.patch
net-stmmac-stop-each-tx-channel-independently.patch
net-usb-qmi_wwan-allow-qmimux-add-del-with-master-up.patch
perf-traceevent-ensure-read-cmdlines-are-null-terminated.patch
s390-cio-return-efault-if-copy_to_user-fails.patch
selftests-forwarding-fix-race-condition-in-mirror-installation.patch

13 files changed:
queue-4.19/cipso-calipso-resolve-a-number-of-problems-with-the-doi-refcounts.patch [new file with mode: 0644]
queue-4.19/net-davicom-fix-regulator-not-turned-off-on-driver-removal.patch [new file with mode: 0644]
queue-4.19/net-davicom-fix-regulator-not-turned-off-on-failed-probe.patch [new file with mode: 0644]
queue-4.19/net-lapbether-remove-netif_start_queue-netif_stop_queue.patch [new file with mode: 0644]
queue-4.19/net-qrtr-fix-error-return-code-of-qrtr_sendmsg.patch [new file with mode: 0644]
queue-4.19/net-sched-avoid-duplicates-in-classes-dump.patch [new file with mode: 0644]
queue-4.19/net-stmmac-fix-watchdog-timeout-during-suspend-resume-stress-test.patch [new file with mode: 0644]
queue-4.19/net-stmmac-stop-each-tx-channel-independently.patch [new file with mode: 0644]
queue-4.19/net-usb-qmi_wwan-allow-qmimux-add-del-with-master-up.patch [new file with mode: 0644]
queue-4.19/perf-traceevent-ensure-read-cmdlines-are-null-terminated.patch [new file with mode: 0644]
queue-4.19/s390-cio-return-efault-if-copy_to_user-fails.patch [new file with mode: 0644]
queue-4.19/selftests-forwarding-fix-race-condition-in-mirror-installation.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/cipso-calipso-resolve-a-number-of-problems-with-the-doi-refcounts.patch b/queue-4.19/cipso-calipso-resolve-a-number-of-problems-with-the-doi-refcounts.patch
new file mode 100644 (file)
index 0000000..ec5bf7f
--- /dev/null
@@ -0,0 +1,134 @@
+From ad5d07f4a9cd671233ae20983848874731102c08 Mon Sep 17 00:00:00 2001
+From: Paul Moore <paul@paul-moore.com>
+Date: Thu, 4 Mar 2021 16:29:51 -0500
+Subject: cipso,calipso: resolve a number of problems with the DOI refcounts
+
+From: Paul Moore <paul@paul-moore.com>
+
+commit ad5d07f4a9cd671233ae20983848874731102c08 upstream.
+
+The current CIPSO and CALIPSO refcounting scheme for the DOI
+definitions is a bit flawed in that we:
+
+1. Don't correctly match gets/puts in netlbl_cipsov4_list().
+2. Decrement the refcount on each attempt to remove the DOI from the
+   DOI list, only removing it from the list once the refcount drops
+   to zero.
+
+This patch fixes these problems by adding the missing "puts" to
+netlbl_cipsov4_list() and introduces a more conventional, i.e.
+not-buggy, refcounting mechanism to the DOI definitions.  Upon the
+addition of a DOI to the DOI list, it is initialized with a refcount
+of one, removing a DOI from the list removes it from the list and
+drops the refcount by one; "gets" and "puts" behave as expected with
+respect to refcounts, increasing and decreasing the DOI's refcount by
+one.
+
+Fixes: b1edeb102397 ("netlabel: Replace protocol/NetLabel linking with refrerence counts")
+Fixes: d7cce01504a0 ("netlabel: Add support for removing a CALIPSO DOI.")
+Reported-by: syzbot+9ec037722d2603a9f52e@syzkaller.appspotmail.com
+Signed-off-by: Paul Moore <paul@paul-moore.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/ipv4/cipso_ipv4.c            |   11 +----------
+ net/ipv6/calipso.c               |   14 +++++---------
+ net/netlabel/netlabel_cipso_v4.c |    3 +++
+ 3 files changed, 9 insertions(+), 19 deletions(-)
+
+--- a/net/ipv4/cipso_ipv4.c
++++ b/net/ipv4/cipso_ipv4.c
+@@ -533,16 +533,10 @@ int cipso_v4_doi_remove(u32 doi, struct
+               ret_val = -ENOENT;
+               goto doi_remove_return;
+       }
+-      if (!refcount_dec_and_test(&doi_def->refcount)) {
+-              spin_unlock(&cipso_v4_doi_list_lock);
+-              ret_val = -EBUSY;
+-              goto doi_remove_return;
+-      }
+       list_del_rcu(&doi_def->list);
+       spin_unlock(&cipso_v4_doi_list_lock);
+-      cipso_v4_cache_invalidate();
+-      call_rcu(&doi_def->rcu, cipso_v4_doi_free_rcu);
++      cipso_v4_doi_putdef(doi_def);
+       ret_val = 0;
+ doi_remove_return:
+@@ -599,9 +593,6 @@ void cipso_v4_doi_putdef(struct cipso_v4
+       if (!refcount_dec_and_test(&doi_def->refcount))
+               return;
+-      spin_lock(&cipso_v4_doi_list_lock);
+-      list_del_rcu(&doi_def->list);
+-      spin_unlock(&cipso_v4_doi_list_lock);
+       cipso_v4_cache_invalidate();
+       call_rcu(&doi_def->rcu, cipso_v4_doi_free_rcu);
+--- a/net/ipv6/calipso.c
++++ b/net/ipv6/calipso.c
+@@ -97,6 +97,9 @@ struct calipso_map_cache_entry {
+ static struct calipso_map_cache_bkt *calipso_cache;
++static void calipso_cache_invalidate(void);
++static void calipso_doi_putdef(struct calipso_doi *doi_def);
++
+ /* Label Mapping Cache Functions
+  */
+@@ -458,15 +461,10 @@ static int calipso_doi_remove(u32 doi, s
+               ret_val = -ENOENT;
+               goto doi_remove_return;
+       }
+-      if (!refcount_dec_and_test(&doi_def->refcount)) {
+-              spin_unlock(&calipso_doi_list_lock);
+-              ret_val = -EBUSY;
+-              goto doi_remove_return;
+-      }
+       list_del_rcu(&doi_def->list);
+       spin_unlock(&calipso_doi_list_lock);
+-      call_rcu(&doi_def->rcu, calipso_doi_free_rcu);
++      calipso_doi_putdef(doi_def);
+       ret_val = 0;
+ doi_remove_return:
+@@ -522,10 +520,8 @@ static void calipso_doi_putdef(struct ca
+       if (!refcount_dec_and_test(&doi_def->refcount))
+               return;
+-      spin_lock(&calipso_doi_list_lock);
+-      list_del_rcu(&doi_def->list);
+-      spin_unlock(&calipso_doi_list_lock);
++      calipso_cache_invalidate();
+       call_rcu(&doi_def->rcu, calipso_doi_free_rcu);
+ }
+--- a/net/netlabel/netlabel_cipso_v4.c
++++ b/net/netlabel/netlabel_cipso_v4.c
+@@ -581,6 +581,7 @@ list_start:
+               break;
+       }
++      cipso_v4_doi_putdef(doi_def);
+       rcu_read_unlock();
+       genlmsg_end(ans_skb, data);
+@@ -589,12 +590,14 @@ list_start:
+ list_retry:
+       /* XXX - this limit is a guesstimate */
+       if (nlsze_mult < 4) {
++              cipso_v4_doi_putdef(doi_def);
+               rcu_read_unlock();
+               kfree_skb(ans_skb);
+               nlsze_mult *= 2;
+               goto list_start;
+       }
+ list_failure_lock:
++      cipso_v4_doi_putdef(doi_def);
+       rcu_read_unlock();
+ list_failure:
+       kfree_skb(ans_skb);
diff --git a/queue-4.19/net-davicom-fix-regulator-not-turned-off-on-driver-removal.patch b/queue-4.19/net-davicom-fix-regulator-not-turned-off-on-driver-removal.patch
new file mode 100644 (file)
index 0000000..1ededde
--- /dev/null
@@ -0,0 +1,54 @@
+From cf9e60aa69ae6c40d3e3e4c94dd6c8de31674e9b Mon Sep 17 00:00:00 2001
+From: Paul Cercueil <paul@crapouillou.net>
+Date: Sun, 7 Mar 2021 13:17:48 +0000
+Subject: net: davicom: Fix regulator not turned off on driver removal
+
+From: Paul Cercueil <paul@crapouillou.net>
+
+commit cf9e60aa69ae6c40d3e3e4c94dd6c8de31674e9b upstream.
+
+We must disable the regulator that was enabled in the probe function.
+
+Fixes: 7994fe55a4a2 ("dm9000: Add regulator and reset support to dm9000")
+Signed-off-by: Paul Cercueil <paul@crapouillou.net>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/davicom/dm9000.c |    9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/davicom/dm9000.c
++++ b/drivers/net/ethernet/davicom/dm9000.c
+@@ -143,6 +143,8 @@ struct board_info {
+       u32             wake_state;
+       int             ip_summed;
++
++      struct regulator *power_supply;
+ };
+ /* debug code */
+@@ -1492,6 +1494,8 @@ dm9000_probe(struct platform_device *pde
+       db->dev = &pdev->dev;
+       db->ndev = ndev;
++      if (!IS_ERR(power))
++              db->power_supply = power;
+       spin_lock_init(&db->lock);
+       mutex_init(&db->addr_lock);
+@@ -1781,10 +1785,13 @@ static int
+ dm9000_drv_remove(struct platform_device *pdev)
+ {
+       struct net_device *ndev = platform_get_drvdata(pdev);
++      struct board_info *dm = to_dm9000_board(ndev);
+       unregister_netdev(ndev);
+-      dm9000_release_board(pdev, netdev_priv(ndev));
++      dm9000_release_board(pdev, dm);
+       free_netdev(ndev);              /* free device structure */
++      if (dm->power_supply)
++              regulator_disable(dm->power_supply);
+       dev_dbg(&pdev->dev, "released and freed device\n");
+       return 0;
diff --git a/queue-4.19/net-davicom-fix-regulator-not-turned-off-on-failed-probe.patch b/queue-4.19/net-davicom-fix-regulator-not-turned-off-on-failed-probe.patch
new file mode 100644 (file)
index 0000000..83f2313
--- /dev/null
@@ -0,0 +1,55 @@
+From ac88c531a5b38877eba2365a3f28f0c8b513dc33 Mon Sep 17 00:00:00 2001
+From: Paul Cercueil <paul@crapouillou.net>
+Date: Sun, 7 Mar 2021 13:17:47 +0000
+Subject: net: davicom: Fix regulator not turned off on failed probe
+
+From: Paul Cercueil <paul@crapouillou.net>
+
+commit ac88c531a5b38877eba2365a3f28f0c8b513dc33 upstream.
+
+When the probe fails or requests to be defered, we must disable the
+regulator that was previously enabled.
+
+Fixes: 7994fe55a4a2 ("dm9000: Add regulator and reset support to dm9000")
+Signed-off-by: Paul Cercueil <paul@crapouillou.net>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/davicom/dm9000.c |   12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/ethernet/davicom/dm9000.c
++++ b/drivers/net/ethernet/davicom/dm9000.c
+@@ -1460,7 +1460,7 @@ dm9000_probe(struct platform_device *pde
+               if (ret) {
+                       dev_err(dev, "failed to request reset gpio %d: %d\n",
+                               reset_gpios, ret);
+-                      return -ENODEV;
++                      goto out_regulator_disable;
+               }
+               /* According to manual PWRST# Low Period Min 1ms */
+@@ -1472,8 +1472,10 @@ dm9000_probe(struct platform_device *pde
+       if (!pdata) {
+               pdata = dm9000_parse_dt(&pdev->dev);
+-              if (IS_ERR(pdata))
+-                      return PTR_ERR(pdata);
++              if (IS_ERR(pdata)) {
++                      ret = PTR_ERR(pdata);
++                      goto out_regulator_disable;
++              }
+       }
+       /* Init network device */
+@@ -1716,6 +1718,10 @@ out:
+       dm9000_release_board(pdev, db);
+       free_netdev(ndev);
++out_regulator_disable:
++      if (!IS_ERR(power))
++              regulator_disable(power);
++
+       return ret;
+ }
diff --git a/queue-4.19/net-lapbether-remove-netif_start_queue-netif_stop_queue.patch b/queue-4.19/net-lapbether-remove-netif_start_queue-netif_stop_queue.patch
new file mode 100644 (file)
index 0000000..384255d
--- /dev/null
@@ -0,0 +1,61 @@
+From f7d9d4854519fdf4d45c70a4d953438cd88e7e58 Mon Sep 17 00:00:00 2001
+From: Xie He <xie.he.0141@gmail.com>
+Date: Sun, 7 Mar 2021 03:33:07 -0800
+Subject: net: lapbether: Remove netif_start_queue / netif_stop_queue
+
+From: Xie He <xie.he.0141@gmail.com>
+
+commit f7d9d4854519fdf4d45c70a4d953438cd88e7e58 upstream.
+
+For the devices in this driver, the default qdisc is "noqueue",
+because their "tx_queue_len" is 0.
+
+In function "__dev_queue_xmit" in "net/core/dev.c", devices with the
+"noqueue" qdisc are specially handled. Packets are transmitted without
+being queued after a "dev->flags & IFF_UP" check. However, it's possible
+that even if this check succeeds, "ops->ndo_stop" may still have already
+been called. This is because in "__dev_close_many", "ops->ndo_stop" is
+called before clearing the "IFF_UP" flag.
+
+If we call "netif_stop_queue" in "ops->ndo_stop", then it's possible in
+"__dev_queue_xmit", it sees the "IFF_UP" flag is present, and then it
+checks "netif_xmit_stopped" and finds that the queue is already stopped.
+In this case, it will complain that:
+"Virtual device ... asks to queue packet!"
+
+To prevent "__dev_queue_xmit" from generating this complaint, we should
+not call "netif_stop_queue" in "ops->ndo_stop".
+
+We also don't need to call "netif_start_queue" in "ops->ndo_open",
+because after a netdev is allocated and registered, the
+"__QUEUE_STATE_DRV_XOFF" flag is initially not set, so there is no need
+to call "netif_start_queue" to clear it.
+
+Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
+Signed-off-by: Xie He <xie.he.0141@gmail.com>
+Acked-by: Martin Schiller <ms@dev.tdt.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/wan/lapbether.c |    3 ---
+ 1 file changed, 3 deletions(-)
+
+--- a/drivers/net/wan/lapbether.c
++++ b/drivers/net/wan/lapbether.c
+@@ -286,7 +286,6 @@ static int lapbeth_open(struct net_devic
+               return -ENODEV;
+       }
+-      netif_start_queue(dev);
+       return 0;
+ }
+@@ -294,8 +293,6 @@ static int lapbeth_close(struct net_devi
+ {
+       int err;
+-      netif_stop_queue(dev);
+-
+       if ((err = lapb_unregister(dev)) != LAPB_OK)
+               pr_err("lapb_unregister error: %d\n", err);
diff --git a/queue-4.19/net-qrtr-fix-error-return-code-of-qrtr_sendmsg.patch b/queue-4.19/net-qrtr-fix-error-return-code-of-qrtr_sendmsg.patch
new file mode 100644 (file)
index 0000000..0270426
--- /dev/null
@@ -0,0 +1,36 @@
+From 179d0ba0c454057a65929c46af0d6ad986754781 Mon Sep 17 00:00:00 2001
+From: Jia-Ju Bai <baijiaju1990@gmail.com>
+Date: Mon, 8 Mar 2021 01:13:55 -0800
+Subject: net: qrtr: fix error return code of qrtr_sendmsg()
+
+From: Jia-Ju Bai <baijiaju1990@gmail.com>
+
+commit 179d0ba0c454057a65929c46af0d6ad986754781 upstream.
+
+When sock_alloc_send_skb() returns NULL to skb, no error return code of
+qrtr_sendmsg() is assigned.
+To fix this bug, rc is assigned with -ENOMEM in this case.
+
+Fixes: 194ccc88297a ("net: qrtr: Support decoding incoming v2 packets")
+Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
+Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/qrtr/qrtr.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/net/qrtr/qrtr.c
++++ b/net/qrtr/qrtr.c
+@@ -797,8 +797,10 @@ static int qrtr_sendmsg(struct socket *s
+       plen = (len + 3) & ~3;
+       skb = sock_alloc_send_skb(sk, plen + QRTR_HDR_MAX_SIZE,
+                                 msg->msg_flags & MSG_DONTWAIT, &rc);
+-      if (!skb)
++      if (!skb) {
++              rc = -ENOMEM;
+               goto out_node;
++      }
+       skb_reserve(skb, QRTR_HDR_MAX_SIZE);
diff --git a/queue-4.19/net-sched-avoid-duplicates-in-classes-dump.patch b/queue-4.19/net-sched-avoid-duplicates-in-classes-dump.patch
new file mode 100644 (file)
index 0000000..e6a459c
--- /dev/null
@@ -0,0 +1,60 @@
+From bfc2560563586372212b0a8aeca7428975fa91fe Mon Sep 17 00:00:00 2001
+From: Maximilian Heyne <mheyne@amazon.de>
+Date: Thu, 4 Mar 2021 14:43:17 +0000
+Subject: net: sched: avoid duplicates in classes dump
+
+From: Maximilian Heyne <mheyne@amazon.de>
+
+commit bfc2560563586372212b0a8aeca7428975fa91fe upstream.
+
+This is a follow up of commit ea3274695353 ("net: sched: avoid
+duplicates in qdisc dump") which has fixed the issue only for the qdisc
+dump.
+
+The duplicate printing also occurs when dumping the classes via
+  tc class show dev eth0
+
+Fixes: 59cc1f61f09c ("net: sched: convert qdisc linked list to hashtable")
+Signed-off-by: Maximilian Heyne <mheyne@amazon.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/sched/sch_api.c |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/net/sched/sch_api.c
++++ b/net/sched/sch_api.c
+@@ -2048,7 +2048,7 @@ static int tc_dump_tclass_qdisc(struct Q
+ static int tc_dump_tclass_root(struct Qdisc *root, struct sk_buff *skb,
+                              struct tcmsg *tcm, struct netlink_callback *cb,
+-                             int *t_p, int s_t)
++                             int *t_p, int s_t, bool recur)
+ {
+       struct Qdisc *q;
+       int b;
+@@ -2059,7 +2059,7 @@ static int tc_dump_tclass_root(struct Qd
+       if (tc_dump_tclass_qdisc(root, skb, tcm, cb, t_p, s_t) < 0)
+               return -1;
+-      if (!qdisc_dev(root))
++      if (!qdisc_dev(root) || !recur)
+               return 0;
+       if (tcm->tcm_parent) {
+@@ -2094,13 +2094,13 @@ static int tc_dump_tclass(struct sk_buff
+       s_t = cb->args[0];
+       t = 0;
+-      if (tc_dump_tclass_root(dev->qdisc, skb, tcm, cb, &t, s_t) < 0)
++      if (tc_dump_tclass_root(dev->qdisc, skb, tcm, cb, &t, s_t, true) < 0)
+               goto done;
+       dev_queue = dev_ingress_queue(dev);
+       if (dev_queue &&
+           tc_dump_tclass_root(dev_queue->qdisc_sleeping, skb, tcm, cb,
+-                              &t, s_t) < 0)
++                              &t, s_t, false) < 0)
+               goto done;
+ done:
diff --git a/queue-4.19/net-stmmac-fix-watchdog-timeout-during-suspend-resume-stress-test.patch b/queue-4.19/net-stmmac-fix-watchdog-timeout-during-suspend-resume-stress-test.patch
new file mode 100644 (file)
index 0000000..80dc0fd
--- /dev/null
@@ -0,0 +1,43 @@
+From c511819d138de38e1637eedb645c207e09680d0f Mon Sep 17 00:00:00 2001
+From: Joakim Zhang <qiangqing.zhang@nxp.com>
+Date: Thu, 25 Feb 2021 17:01:11 +0800
+Subject: net: stmmac: fix watchdog timeout during suspend/resume stress test
+
+From: Joakim Zhang <qiangqing.zhang@nxp.com>
+
+commit c511819d138de38e1637eedb645c207e09680d0f upstream.
+
+stmmac_xmit() call stmmac_tx_timer_arm() at the end to modify tx timer to
+do the transmission cleanup work. Imagine such a situation, stmmac enters
+suspend immediately after tx timer modified, it's expire callback
+stmmac_tx_clean() would not be invoked. This could affect BQL, since
+netdev_tx_sent_queue() has been called, but netdev_tx_completed_queue()
+have not been involved, as a result, dql_avail(&dev_queue->dql) finally
+always return a negative value.
+
+__dev_queue_xmit->__dev_xmit_skb->qdisc_run->__qdisc_run->qdisc_restart->dequeue_skb:
+       if ((q->flags & TCQ_F_ONETXQUEUE) &&
+               netif_xmit_frozen_or_stopped(txq)) // __QUEUE_STATE_STACK_XOFF is set
+
+Net core will stop transmitting any more. Finillay, net watchdong would timeout.
+To fix this issue, we should call netdev_tx_reset_queue() in stmmac_resume().
+
+Fixes: 54139cf3bb33 ("net: stmmac: adding multiple buffers for rx")
+Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+@@ -4566,6 +4566,8 @@ static void stmmac_reset_queues_param(st
+               tx_q->cur_tx = 0;
+               tx_q->dirty_tx = 0;
+               tx_q->mss = 0;
++
++              netdev_tx_reset_queue(netdev_get_tx_queue(priv->dev, queue));
+       }
+ }
diff --git a/queue-4.19/net-stmmac-stop-each-tx-channel-independently.patch b/queue-4.19/net-stmmac-stop-each-tx-channel-independently.patch
new file mode 100644 (file)
index 0000000..3a2f79b
--- /dev/null
@@ -0,0 +1,33 @@
+From a3e860a83397bf761ec1128a3f0ba186445992c6 Mon Sep 17 00:00:00 2001
+From: Joakim Zhang <qiangqing.zhang@nxp.com>
+Date: Thu, 25 Feb 2021 17:01:10 +0800
+Subject: net: stmmac: stop each tx channel independently
+
+From: Joakim Zhang <qiangqing.zhang@nxp.com>
+
+commit a3e860a83397bf761ec1128a3f0ba186445992c6 upstream.
+
+If clear GMAC_CONFIG_TE bit, it would stop all tx channels, but users
+may only want to stop specific tx channel.
+
+Fixes: 48863ce5940f ("stmmac: add DMA support for GMAC 4.xx")
+Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c |    4 ----
+ 1 file changed, 4 deletions(-)
+
+--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
+@@ -63,10 +63,6 @@ void dwmac4_dma_stop_tx(void __iomem *io
+       value &= ~DMA_CONTROL_ST;
+       writel(value, ioaddr + DMA_CHAN_TX_CONTROL(chan));
+-
+-      value = readl(ioaddr + GMAC_CONFIG);
+-      value &= ~GMAC_CONFIG_TE;
+-      writel(value, ioaddr + GMAC_CONFIG);
+ }
+ void dwmac4_dma_start_rx(void __iomem *ioaddr, u32 chan)
diff --git a/queue-4.19/net-usb-qmi_wwan-allow-qmimux-add-del-with-master-up.patch b/queue-4.19/net-usb-qmi_wwan-allow-qmimux-add-del-with-master-up.patch
new file mode 100644 (file)
index 0000000..26b2ade
--- /dev/null
@@ -0,0 +1,60 @@
+From 6c59cff38e66584ae3ac6c2f0cbd8d039c710ba7 Mon Sep 17 00:00:00 2001
+From: Daniele Palmas <dnlplm@gmail.com>
+Date: Thu, 4 Mar 2021 14:15:13 +0100
+Subject: net: usb: qmi_wwan: allow qmimux add/del with master up
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Daniele Palmas <dnlplm@gmail.com>
+
+commit 6c59cff38e66584ae3ac6c2f0cbd8d039c710ba7 upstream.
+
+There's no reason for preventing the creation and removal
+of qmimux network interfaces when the underlying interface
+is up.
+
+This makes qmi_wwan mux implementation more similar to the
+rmnet one, simplifying userspace management of the same
+logical interfaces.
+
+Fixes: c6adf77953bc ("net: usb: qmi_wwan: add qmap mux protocol support")
+Reported-by: Aleksander Morgado <aleksander@aleksander.es>
+Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
+Acked-by: Bjørn Mork <bjorn@mork.no>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/usb/qmi_wwan.c |   14 --------------
+ 1 file changed, 14 deletions(-)
+
+--- a/drivers/net/usb/qmi_wwan.c
++++ b/drivers/net/usb/qmi_wwan.c
+@@ -378,13 +378,6 @@ static ssize_t add_mux_store(struct devi
+               goto err;
+       }
+-      /* we don't want to modify a running netdev */
+-      if (netif_running(dev->net)) {
+-              netdev_err(dev->net, "Cannot change a running device\n");
+-              ret = -EBUSY;
+-              goto err;
+-      }
+-
+       ret = qmimux_register_device(dev->net, mux_id);
+       if (!ret) {
+               info->flags |= QMI_WWAN_FLAG_MUX;
+@@ -414,13 +407,6 @@ static ssize_t del_mux_store(struct devi
+       if (!rtnl_trylock())
+               return restart_syscall();
+-      /* we don't want to modify a running netdev */
+-      if (netif_running(dev->net)) {
+-              netdev_err(dev->net, "Cannot change a running device\n");
+-              ret = -EBUSY;
+-              goto err;
+-      }
+-
+       del_dev = qmimux_find_dev(dev, mux_id);
+       if (!del_dev) {
+               netdev_err(dev->net, "mux_id not present\n");
diff --git a/queue-4.19/perf-traceevent-ensure-read-cmdlines-are-null-terminated.patch b/queue-4.19/perf-traceevent-ensure-read-cmdlines-are-null-terminated.patch
new file mode 100644 (file)
index 0000000..2c1d76e
--- /dev/null
@@ -0,0 +1,36 @@
+From 137a5258939aca56558f3a23eb229b9c4b293917 Mon Sep 17 00:00:00 2001
+From: Ian Rogers <irogers@google.com>
+Date: Fri, 26 Feb 2021 14:14:31 -0800
+Subject: perf traceevent: Ensure read cmdlines are null terminated.
+
+From: Ian Rogers <irogers@google.com>
+
+commit 137a5258939aca56558f3a23eb229b9c4b293917 upstream.
+
+Issue detected by address sanitizer.
+
+Fixes: cd4ceb63438e9e28 ("perf util: Save pid-cmdline mapping into tracing header")
+Signed-off-by: Ian Rogers <irogers@google.com>
+Acked-by: Namhyung Kim <namhyung@kernel.org>
+Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
+Cc: Jiri Olsa <jolsa@redhat.com>
+Cc: Mark Rutland <mark.rutland@arm.com>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Stephane Eranian <eranian@google.com>
+Link: http://lore.kernel.org/lkml/20210226221431.1985458-1-irogers@google.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/perf/util/trace-event-read.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/tools/perf/util/trace-event-read.c
++++ b/tools/perf/util/trace-event-read.c
+@@ -381,6 +381,7 @@ static int read_saved_cmdline(struct tep
+               pr_debug("error reading saved cmdlines\n");
+               goto out;
+       }
++      buf[ret] = '\0';
+       parse_saved_cmdline(pevent, buf, size);
+       ret = 0;
diff --git a/queue-4.19/s390-cio-return-efault-if-copy_to_user-fails.patch b/queue-4.19/s390-cio-return-efault-if-copy_to_user-fails.patch
new file mode 100644 (file)
index 0000000..4772a7e
--- /dev/null
@@ -0,0 +1,42 @@
+From 51c44babdc19aaf882e1213325a0ba291573308f Mon Sep 17 00:00:00 2001
+From: Wang Qing <wangqing@vivo.com>
+Date: Mon, 1 Mar 2021 20:01:33 +0800
+Subject: s390/cio: return -EFAULT if copy_to_user() fails
+
+From: Wang Qing <wangqing@vivo.com>
+
+commit 51c44babdc19aaf882e1213325a0ba291573308f upstream.
+
+The copy_to_user() function returns the number of bytes remaining to be
+copied, but we want to return -EFAULT if the copy doesn't complete.
+
+Fixes: e01bcdd61320 ("vfio: ccw: realize VFIO_DEVICE_GET_REGION_INFO ioctl")
+Signed-off-by: Wang Qing <wangqing@vivo.com>
+Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
+Link: https://lore.kernel.org/r/1614600093-13992-1-git-send-email-wangqing@vivo.com
+Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/s390/cio/vfio_ccw_ops.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/s390/cio/vfio_ccw_ops.c
++++ b/drivers/s390/cio/vfio_ccw_ops.c
+@@ -341,7 +341,7 @@ static ssize_t vfio_ccw_mdev_ioctl(struc
+               if (ret)
+                       return ret;
+-              return copy_to_user((void __user *)arg, &info, minsz);
++              return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0;
+       }
+       case VFIO_DEVICE_GET_REGION_INFO:
+       {
+@@ -362,7 +362,7 @@ static ssize_t vfio_ccw_mdev_ioctl(struc
+               if (ret)
+                       return ret;
+-              return copy_to_user((void __user *)arg, &info, minsz);
++              return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0;
+       }
+       case VFIO_DEVICE_GET_IRQ_INFO:
+       {
diff --git a/queue-4.19/selftests-forwarding-fix-race-condition-in-mirror-installation.patch b/queue-4.19/selftests-forwarding-fix-race-condition-in-mirror-installation.patch
new file mode 100644 (file)
index 0000000..add5df4
--- /dev/null
@@ -0,0 +1,54 @@
+From edcbf5137f093b5502f5f6b97cce3cbadbde27aa Mon Sep 17 00:00:00 2001
+From: Danielle Ratson <danieller@nvidia.com>
+Date: Thu, 25 Feb 2021 18:57:19 +0200
+Subject: selftests: forwarding: Fix race condition in mirror installation
+
+From: Danielle Ratson <danieller@nvidia.com>
+
+commit edcbf5137f093b5502f5f6b97cce3cbadbde27aa upstream.
+
+When mirroring to a gretap in hardware the device expects to be
+programmed with the egress port and all the encapsulating headers. This
+requires the driver to resolve the path the packet will take in the
+software data path and program the device accordingly.
+
+If the path cannot be resolved (in this case because of an unresolved
+neighbor), then mirror installation fails until the path is resolved.
+This results in a race that causes the test to sometimes fail.
+
+Fix this by setting the neighbor's state to permanent, so that it is
+always valid.
+
+Fixes: b5b029399fa6d ("selftests: forwarding: mirror_gre_bridge_1d_vlan: Add STP test")
+Signed-off-by: Danielle Ratson <danieller@nvidia.com>
+Reviewed-by: Petr Machata <petrm@nvidia.com>
+Signed-off-by: Ido Schimmel <idosch@nvidia.com>
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh
++++ b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh
+@@ -86,11 +86,20 @@ test_ip6gretap()
+ test_gretap_stp()
+ {
++      # Sometimes after mirror installation, the neighbor's state is not valid.
++      # The reason is that there is no SW datapath activity related to the
++      # neighbor for the remote GRE address. Therefore whether the corresponding
++      # neighbor will be valid is a matter of luck, and the test is thus racy.
++      # Set the neighbor's state to permanent, so it would be always valid.
++      ip neigh replace 192.0.2.130 lladdr $(mac_get $h3) \
++              nud permanent dev br2
+       full_test_span_gre_stp gt4 $swp3.555 "mirror to gretap"
+ }
+ test_ip6gretap_stp()
+ {
++      ip neigh replace 2001:db8:2::2 lladdr $(mac_get $h3) \
++              nud permanent dev br2
+       full_test_span_gre_stp gt6 $swp3.555 "mirror to ip6gretap"
+ }
index 335216940b75efc6177d3b9eb88cb44a0bf14efa..592f955857aa3e833f666db1da3640847500012d 100644 (file)
@@ -19,3 +19,15 @@ net-check-if-protocol-extracted-by-virtio_net_hdr_set_proto-is-correct.patch
 net-avoid-infinite-loop-in-mpls_gso_segment-when-mpls_hlen-0.patch
 net-mlx4_en-update-moderation-when-config-reset.patch
 net-stmmac-fix-incorrect-dma-channel-intr-enable-setting-of-eqos-v4.10.patch
+net-sched-avoid-duplicates-in-classes-dump.patch
+net-usb-qmi_wwan-allow-qmimux-add-del-with-master-up.patch
+cipso-calipso-resolve-a-number-of-problems-with-the-doi-refcounts.patch
+net-lapbether-remove-netif_start_queue-netif_stop_queue.patch
+net-davicom-fix-regulator-not-turned-off-on-failed-probe.patch
+net-davicom-fix-regulator-not-turned-off-on-driver-removal.patch
+net-qrtr-fix-error-return-code-of-qrtr_sendmsg.patch
+net-stmmac-stop-each-tx-channel-independently.patch
+net-stmmac-fix-watchdog-timeout-during-suspend-resume-stress-test.patch
+selftests-forwarding-fix-race-condition-in-mirror-installation.patch
+perf-traceevent-ensure-read-cmdlines-are-null-terminated.patch
+s390-cio-return-efault-if-copy_to_user-fails.patch