]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop some patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Jul 2021 17:58:17 +0000 (19:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Jul 2021 17:58:17 +0000 (19:58 +0200)
17 files changed:
queue-4.14/net-moxa-use-devm_platform_get_and_ioremap_resource.patch [deleted file]
queue-4.14/series
queue-4.19/net-moxa-use-devm_platform_get_and_ioremap_resource.patch [deleted file]
queue-4.19/series
queue-4.4/net-moxa-use-devm_platform_get_and_ioremap_resource.patch [deleted file]
queue-4.4/series
queue-4.9/net-moxa-use-devm_platform_get_and_ioremap_resource.patch [deleted file]
queue-4.9/series
queue-5.10/series
queue-5.10/xfrm-policy-read-seqcount-outside-of-rcu-read-side-in-xfrm_policy_lookup_bytype.patch [deleted file]
queue-5.12/series
queue-5.12/xfrm-policy-read-seqcount-outside-of-rcu-read-side-in-xfrm_policy_lookup_bytype.patch [deleted file]
queue-5.13/series
queue-5.13/xfrm-policy-read-seqcount-outside-of-rcu-read-side-in-xfrm_policy_lookup_bytype.patch [deleted file]
queue-5.4/net-moxa-use-devm_platform_get_and_ioremap_resource.patch [deleted file]
queue-5.4/series
queue-5.4/xfrm-policy-read-seqcount-outside-of-rcu-read-side-in-xfrm_policy_lookup_bytype.patch [deleted file]

diff --git a/queue-4.14/net-moxa-use-devm_platform_get_and_ioremap_resource.patch b/queue-4.14/net-moxa-use-devm_platform_get_and_ioremap_resource.patch
deleted file mode 100644 (file)
index 1bfda2b..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-From 6f8b363a885f8db2c0169d89b186f28a7ab88f6e Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 7 Jun 2021 23:02:59 +0800
-Subject: net: moxa: Use devm_platform_get_and_ioremap_resource()
-
-From: Yang Yingliang <yangyingliang@huawei.com>
-
-[ Upstream commit 35cba15a504bf4f585bb9d78f47b22b28a1a06b2 ]
-
-Use devm_platform_get_and_ioremap_resource() to simplify
-code and avoid a null-ptr-deref by checking 'res' in it.
-
-Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/net/ethernet/moxa/moxart_ether.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c
-index beb730ff5d42..794f1702e54c 100644
---- a/drivers/net/ethernet/moxa/moxart_ether.c
-+++ b/drivers/net/ethernet/moxa/moxart_ether.c
-@@ -477,14 +477,13 @@ static int moxart_mac_probe(struct platform_device *pdev)
-       priv = netdev_priv(ndev);
-       priv->ndev = ndev;
--      res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
--      ndev->base_addr = res->start;
--      priv->base = devm_ioremap_resource(p_dev, res);
-+      priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
-       if (IS_ERR(priv->base)) {
-               dev_err(p_dev, "devm_ioremap_resource failed\n");
-               ret = PTR_ERR(priv->base);
-               goto init_fail;
-       }
-+      ndev->base_addr = res->start;
-       spin_lock_init(&priv->txlock);
--- 
-2.30.2
-
index b220592f1caf82820f5b0b225ce2e8743f8ef5f0..c319e7929fe6adde6ec73a95cbd0ff1475d68f07 100644 (file)
@@ -178,7 +178,6 @@ dm-space-maps-don-t-reset-space-map-allocation-curso.patch
 virtio_net-remove-bug-to-avoid-machine-dead.patch
 net-bcmgenet-check-return-value-after-calling-platfo.patch
 net-micrel-check-return-value-after-calling-platform.patch
-net-moxa-use-devm_platform_get_and_ioremap_resource.patch
 fjes-check-return-value-after-calling-platform_get_r.patch
 selinux-use-__gfp_nowarn-with-gfp_nowait-in-the-avc.patch
 xfrm-fix-error-reporting-in-xfrm_state_construct.patch
diff --git a/queue-4.19/net-moxa-use-devm_platform_get_and_ioremap_resource.patch b/queue-4.19/net-moxa-use-devm_platform_get_and_ioremap_resource.patch
deleted file mode 100644 (file)
index b70fe56..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-From 0429310d30cb53c898762db8e0735b611eb3c8cd Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 7 Jun 2021 23:02:59 +0800
-Subject: net: moxa: Use devm_platform_get_and_ioremap_resource()
-
-From: Yang Yingliang <yangyingliang@huawei.com>
-
-[ Upstream commit 35cba15a504bf4f585bb9d78f47b22b28a1a06b2 ]
-
-Use devm_platform_get_and_ioremap_resource() to simplify
-code and avoid a null-ptr-deref by checking 'res' in it.
-
-Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/net/ethernet/moxa/moxart_ether.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c
-index 4db3431b79ac..223019a74033 100644
---- a/drivers/net/ethernet/moxa/moxart_ether.c
-+++ b/drivers/net/ethernet/moxa/moxart_ether.c
-@@ -477,14 +477,13 @@ static int moxart_mac_probe(struct platform_device *pdev)
-       priv = netdev_priv(ndev);
-       priv->ndev = ndev;
--      res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
--      ndev->base_addr = res->start;
--      priv->base = devm_ioremap_resource(p_dev, res);
-+      priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
-       if (IS_ERR(priv->base)) {
-               dev_err(p_dev, "devm_ioremap_resource failed\n");
-               ret = PTR_ERR(priv->base);
-               goto init_fail;
-       }
-+      ndev->base_addr = res->start;
-       spin_lock_init(&priv->txlock);
--- 
-2.30.2
-
index 2b77e264e21479e7518cc63cf612682dabf566b3..4ffe17b69661e3cec40993533b8cc774b665f492 100644 (file)
@@ -249,7 +249,6 @@ virtio_net-remove-bug-to-avoid-machine-dead.patch
 net-bcmgenet-check-return-value-after-calling-platfo.patch
 net-mvpp2-check-return-value-after-calling-platform_.patch
 net-micrel-check-return-value-after-calling-platform.patch
-net-moxa-use-devm_platform_get_and_ioremap_resource.patch
 fjes-check-return-value-after-calling-platform_get_r.patch
 selinux-use-__gfp_nowarn-with-gfp_nowait-in-the-avc.patch
 xfrm-fix-error-reporting-in-xfrm_state_construct.patch
diff --git a/queue-4.4/net-moxa-use-devm_platform_get_and_ioremap_resource.patch b/queue-4.4/net-moxa-use-devm_platform_get_and_ioremap_resource.patch
deleted file mode 100644 (file)
index e8dfa99..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-From 6e05f36367a2588ec603dd5c8591c48e7ce20334 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 7 Jun 2021 23:02:59 +0800
-Subject: net: moxa: Use devm_platform_get_and_ioremap_resource()
-
-From: Yang Yingliang <yangyingliang@huawei.com>
-
-[ Upstream commit 35cba15a504bf4f585bb9d78f47b22b28a1a06b2 ]
-
-Use devm_platform_get_and_ioremap_resource() to simplify
-code and avoid a null-ptr-deref by checking 'res' in it.
-
-Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/net/ethernet/moxa/moxart_ether.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c
-index 374e691b11da..ed3c5d2d7e0e 100644
---- a/drivers/net/ethernet/moxa/moxart_ether.c
-+++ b/drivers/net/ethernet/moxa/moxart_ether.c
-@@ -457,14 +457,13 @@ static int moxart_mac_probe(struct platform_device *pdev)
-       priv = netdev_priv(ndev);
-       priv->ndev = ndev;
--      res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
--      ndev->base_addr = res->start;
--      priv->base = devm_ioremap_resource(p_dev, res);
-+      priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
-       if (IS_ERR(priv->base)) {
-               dev_err(p_dev, "devm_ioremap_resource failed\n");
-               ret = PTR_ERR(priv->base);
-               goto init_fail;
-       }
-+      ndev->base_addr = res->start;
-       spin_lock_init(&priv->txlock);
--- 
-2.30.2
-
index 328c4d0a60c5b019378faebf5fb9e4bac047c023..782e9997fa2e657af83442ef3ca8c7dd2e5cf329 100644 (file)
@@ -105,7 +105,6 @@ ipv6-use-prandom_u32-for-id-generation.patch
 rdma-cxgb4-fix-missing-error-code-in-create_qp.patch
 dm-space-maps-don-t-reset-space-map-allocation-curso.patch
 net-micrel-check-return-value-after-calling-platform.patch
-net-moxa-use-devm_platform_get_and_ioremap_resource.patch
 selinux-use-__gfp_nowarn-with-gfp_nowait-in-the-avc.patch
 xfrm-fix-error-reporting-in-xfrm_state_construct.patch
 wlcore-wl12xx-fix-wl12xx-get_mac-error-if-device-is-.patch
diff --git a/queue-4.9/net-moxa-use-devm_platform_get_and_ioremap_resource.patch b/queue-4.9/net-moxa-use-devm_platform_get_and_ioremap_resource.patch
deleted file mode 100644 (file)
index d0ddb48..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-From cd8f4d5f36e62966eb94ad2bb0d594848f775e61 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 7 Jun 2021 23:02:59 +0800
-Subject: net: moxa: Use devm_platform_get_and_ioremap_resource()
-
-From: Yang Yingliang <yangyingliang@huawei.com>
-
-[ Upstream commit 35cba15a504bf4f585bb9d78f47b22b28a1a06b2 ]
-
-Use devm_platform_get_and_ioremap_resource() to simplify
-code and avoid a null-ptr-deref by checking 'res' in it.
-
-Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/net/ethernet/moxa/moxart_ether.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c
-index 6fe61d9343cb..9673fbe16774 100644
---- a/drivers/net/ethernet/moxa/moxart_ether.c
-+++ b/drivers/net/ethernet/moxa/moxart_ether.c
-@@ -487,14 +487,13 @@ static int moxart_mac_probe(struct platform_device *pdev)
-       priv = netdev_priv(ndev);
-       priv->ndev = ndev;
--      res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
--      ndev->base_addr = res->start;
--      priv->base = devm_ioremap_resource(p_dev, res);
-+      priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
-       if (IS_ERR(priv->base)) {
-               dev_err(p_dev, "devm_ioremap_resource failed\n");
-               ret = PTR_ERR(priv->base);
-               goto init_fail;
-       }
-+      ndev->base_addr = res->start;
-       spin_lock_init(&priv->txlock);
--- 
-2.30.2
-
index ea2c7a526b87fcfa9149eb0a90b6000fef0eb928..6e308c463fb78eedfd2b71eeb82b104497a44deb 100644 (file)
@@ -136,7 +136,6 @@ ipv6-use-prandom_u32-for-id-generation.patch
 rdma-cxgb4-fix-missing-error-code-in-create_qp.patch
 dm-space-maps-don-t-reset-space-map-allocation-curso.patch
 net-micrel-check-return-value-after-calling-platform.patch
-net-moxa-use-devm_platform_get_and_ioremap_resource.patch
 fjes-check-return-value-after-calling-platform_get_r.patch
 selinux-use-__gfp_nowarn-with-gfp_nowait-in-the-avc.patch
 xfrm-fix-error-reporting-in-xfrm_state_construct.patch
index 4d4702ae0fcbb30b3be1770caa95a44c12b87ba7..6a15c26083c94ffba2d0f939d9d00b5764cce8a3 100644 (file)
@@ -176,7 +176,6 @@ asoc-tegra-set-driver_name-tegra-for-all-machine-drivers.patch
 i40e-fix-ptp-on-5gb-links.patch
 qemu_fw_cfg-make-fw_cfg_rev_attr-a-proper-kobj_attribute.patch
 ipmi-watchdog-stop-watchdog-timer-when-the-current-action-is-none.patch
-xfrm-policy-read-seqcount-outside-of-rcu-read-side-in-xfrm_policy_lookup_bytype.patch
 thermal-drivers-int340x-processor_thermal-fix-tcc-setting.patch
 ubifs-fix-races-between-xattr_-set-get-and-listxattr-operations.patch
 power-supply-ab8500-fix-an-old-bug.patch
diff --git a/queue-5.10/xfrm-policy-read-seqcount-outside-of-rcu-read-side-in-xfrm_policy_lookup_bytype.patch b/queue-5.10/xfrm-policy-read-seqcount-outside-of-rcu-read-side-in-xfrm_policy_lookup_bytype.patch
deleted file mode 100644 (file)
index 853a74a..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-From d7b0408934c749f546b01f2b33d07421a49b6f3e Mon Sep 17 00:00:00 2001
-From: Varad Gautam <varad.gautam@suse.com>
-Date: Fri, 28 May 2021 18:04:06 +0200
-Subject: xfrm: policy: Read seqcount outside of rcu-read side in xfrm_policy_lookup_bytype
-
-From: Varad Gautam <varad.gautam@suse.com>
-
-commit d7b0408934c749f546b01f2b33d07421a49b6f3e upstream.
-
-xfrm_policy_lookup_bytype loops on seqcount mutex xfrm_policy_hash_generation
-within an RCU read side critical section. Although ill advised, this is fine if
-the loop is bounded.
-
-xfrm_policy_hash_generation wraps mutex hash_resize_mutex, which is used to
-serialize writers (xfrm_hash_resize, xfrm_hash_rebuild). This is fine too.
-
-On PREEMPT_RT=y, the read_seqcount_begin call within xfrm_policy_lookup_bytype
-emits a mutex lock/unlock for hash_resize_mutex. Mutex locking is fine, since
-RCU read side critical sections are allowed to sleep with PREEMPT_RT.
-
-xfrm_hash_resize can, however, block on synchronize_rcu while holding
-hash_resize_mutex.
-
-This leads to the following situation on PREEMPT_RT, where the writer is
-blocked on RCU grace period expiry, while the reader is blocked on a lock held
-by the writer:
-
-Thead 1 (xfrm_hash_resize)     Thread 2 (xfrm_policy_lookup_bytype)
-
-                               rcu_read_lock();
-mutex_lock(&hash_resize_mutex);
-                               read_seqcount_begin(&xfrm_policy_hash_generation);
-                               mutex_lock(&hash_resize_mutex); // block
-xfrm_bydst_resize();
-synchronize_rcu(); // block
-               <RCU stalls in xfrm_policy_lookup_bytype>
-
-Move the read_seqcount_begin call outside of the RCU read side critical section,
-and do an rcu_read_unlock/retry if we got stale data within the critical section.
-
-On non-PREEMPT_RT, this shortens the time spent within RCU read side critical
-section in case the seqcount needs a retry, and avoids unbounded looping.
-
-Fixes: 77cc278f7b20 ("xfrm: policy: Use sequence counters with associated lock")
-Signed-off-by: Varad Gautam <varad.gautam@suse.com>
-Cc: linux-rt-users <linux-rt-users@vger.kernel.org>
-Cc: netdev@vger.kernel.org
-Cc: stable@vger.kernel.org # v4.9
-Cc: Steffen Klassert <steffen.klassert@secunet.com>
-Cc: Herbert Xu <herbert@gondor.apana.org.au>
-Cc: "David S. Miller" <davem@davemloft.net>
-Cc: Jakub Kicinski <kuba@kernel.org>
-Cc: Florian Westphal <fw@strlen.de>
-Cc: "Ahmed S. Darwish" <a.darwish@linutronix.de>
-Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
-Acked-by: Ahmed S. Darwish <a.darwish@linutronix.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- net/xfrm/xfrm_policy.c |   21 ++++++++++++++-------
- 1 file changed, 14 insertions(+), 7 deletions(-)
-
---- a/net/xfrm/xfrm_policy.c
-+++ b/net/xfrm/xfrm_policy.c
-@@ -2092,12 +2092,15 @@ static struct xfrm_policy *xfrm_policy_l
-       if (unlikely(!daddr || !saddr))
-               return NULL;
--      rcu_read_lock();
-  retry:
--      do {
--              sequence = read_seqcount_begin(&xfrm_policy_hash_generation);
--              chain = policy_hash_direct(net, daddr, saddr, family, dir);
--      } while (read_seqcount_retry(&xfrm_policy_hash_generation, sequence));
-+      sequence = read_seqcount_begin(&xfrm_policy_hash_generation);
-+      rcu_read_lock();
-+
-+      chain = policy_hash_direct(net, daddr, saddr, family, dir);
-+      if (read_seqcount_retry(&xfrm_policy_hash_generation, sequence)) {
-+              rcu_read_unlock();
-+              goto retry;
-+      }
-       ret = NULL;
-       hlist_for_each_entry_rcu(pol, chain, bydst) {
-@@ -2128,11 +2131,15 @@ static struct xfrm_policy *xfrm_policy_l
-       }
- skip_inexact:
--      if (read_seqcount_retry(&xfrm_policy_hash_generation, sequence))
-+      if (read_seqcount_retry(&xfrm_policy_hash_generation, sequence)) {
-+              rcu_read_unlock();
-               goto retry;
-+      }
--      if (ret && !xfrm_pol_hold_rcu(ret))
-+      if (ret && !xfrm_pol_hold_rcu(ret)) {
-+              rcu_read_unlock();
-               goto retry;
-+      }
- fail:
-       rcu_read_unlock();
index ecbca880b6364eda698e1e2dfd104d106a37c2f0..f9cbaee39b7b4b2214d4a261325e58d06d10b95c 100644 (file)
@@ -195,7 +195,6 @@ mwifiex-bring-down-link-before-deleting-interface.patch
 i40e-fix-ptp-on-5gb-links.patch
 qemu_fw_cfg-make-fw_cfg_rev_attr-a-proper-kobj_attribute.patch
 ipmi-watchdog-stop-watchdog-timer-when-the-current-action-is-none.patch
-xfrm-policy-read-seqcount-outside-of-rcu-read-side-in-xfrm_policy_lookup_bytype.patch
 thermal-drivers-int340x-processor_thermal-fix-tcc-setting.patch
 ubifs-fix-races-between-xattr_-set-get-and-listxattr-operations.patch
 power-supply-ab8500-fix-an-old-bug.patch
diff --git a/queue-5.12/xfrm-policy-read-seqcount-outside-of-rcu-read-side-in-xfrm_policy_lookup_bytype.patch b/queue-5.12/xfrm-policy-read-seqcount-outside-of-rcu-read-side-in-xfrm_policy_lookup_bytype.patch
deleted file mode 100644 (file)
index 853a74a..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-From d7b0408934c749f546b01f2b33d07421a49b6f3e Mon Sep 17 00:00:00 2001
-From: Varad Gautam <varad.gautam@suse.com>
-Date: Fri, 28 May 2021 18:04:06 +0200
-Subject: xfrm: policy: Read seqcount outside of rcu-read side in xfrm_policy_lookup_bytype
-
-From: Varad Gautam <varad.gautam@suse.com>
-
-commit d7b0408934c749f546b01f2b33d07421a49b6f3e upstream.
-
-xfrm_policy_lookup_bytype loops on seqcount mutex xfrm_policy_hash_generation
-within an RCU read side critical section. Although ill advised, this is fine if
-the loop is bounded.
-
-xfrm_policy_hash_generation wraps mutex hash_resize_mutex, which is used to
-serialize writers (xfrm_hash_resize, xfrm_hash_rebuild). This is fine too.
-
-On PREEMPT_RT=y, the read_seqcount_begin call within xfrm_policy_lookup_bytype
-emits a mutex lock/unlock for hash_resize_mutex. Mutex locking is fine, since
-RCU read side critical sections are allowed to sleep with PREEMPT_RT.
-
-xfrm_hash_resize can, however, block on synchronize_rcu while holding
-hash_resize_mutex.
-
-This leads to the following situation on PREEMPT_RT, where the writer is
-blocked on RCU grace period expiry, while the reader is blocked on a lock held
-by the writer:
-
-Thead 1 (xfrm_hash_resize)     Thread 2 (xfrm_policy_lookup_bytype)
-
-                               rcu_read_lock();
-mutex_lock(&hash_resize_mutex);
-                               read_seqcount_begin(&xfrm_policy_hash_generation);
-                               mutex_lock(&hash_resize_mutex); // block
-xfrm_bydst_resize();
-synchronize_rcu(); // block
-               <RCU stalls in xfrm_policy_lookup_bytype>
-
-Move the read_seqcount_begin call outside of the RCU read side critical section,
-and do an rcu_read_unlock/retry if we got stale data within the critical section.
-
-On non-PREEMPT_RT, this shortens the time spent within RCU read side critical
-section in case the seqcount needs a retry, and avoids unbounded looping.
-
-Fixes: 77cc278f7b20 ("xfrm: policy: Use sequence counters with associated lock")
-Signed-off-by: Varad Gautam <varad.gautam@suse.com>
-Cc: linux-rt-users <linux-rt-users@vger.kernel.org>
-Cc: netdev@vger.kernel.org
-Cc: stable@vger.kernel.org # v4.9
-Cc: Steffen Klassert <steffen.klassert@secunet.com>
-Cc: Herbert Xu <herbert@gondor.apana.org.au>
-Cc: "David S. Miller" <davem@davemloft.net>
-Cc: Jakub Kicinski <kuba@kernel.org>
-Cc: Florian Westphal <fw@strlen.de>
-Cc: "Ahmed S. Darwish" <a.darwish@linutronix.de>
-Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
-Acked-by: Ahmed S. Darwish <a.darwish@linutronix.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- net/xfrm/xfrm_policy.c |   21 ++++++++++++++-------
- 1 file changed, 14 insertions(+), 7 deletions(-)
-
---- a/net/xfrm/xfrm_policy.c
-+++ b/net/xfrm/xfrm_policy.c
-@@ -2092,12 +2092,15 @@ static struct xfrm_policy *xfrm_policy_l
-       if (unlikely(!daddr || !saddr))
-               return NULL;
--      rcu_read_lock();
-  retry:
--      do {
--              sequence = read_seqcount_begin(&xfrm_policy_hash_generation);
--              chain = policy_hash_direct(net, daddr, saddr, family, dir);
--      } while (read_seqcount_retry(&xfrm_policy_hash_generation, sequence));
-+      sequence = read_seqcount_begin(&xfrm_policy_hash_generation);
-+      rcu_read_lock();
-+
-+      chain = policy_hash_direct(net, daddr, saddr, family, dir);
-+      if (read_seqcount_retry(&xfrm_policy_hash_generation, sequence)) {
-+              rcu_read_unlock();
-+              goto retry;
-+      }
-       ret = NULL;
-       hlist_for_each_entry_rcu(pol, chain, bydst) {
-@@ -2128,11 +2131,15 @@ static struct xfrm_policy *xfrm_policy_l
-       }
- skip_inexact:
--      if (read_seqcount_retry(&xfrm_policy_hash_generation, sequence))
-+      if (read_seqcount_retry(&xfrm_policy_hash_generation, sequence)) {
-+              rcu_read_unlock();
-               goto retry;
-+      }
--      if (ret && !xfrm_pol_hold_rcu(ret))
-+      if (ret && !xfrm_pol_hold_rcu(ret)) {
-+              rcu_read_unlock();
-               goto retry;
-+      }
- fail:
-       rcu_read_unlock();
index e55cd4f03f5b70ce6e969d04a1dfca706b3d76d5..e664548844c2daa7b574953712dd28df9e90e507 100644 (file)
@@ -219,7 +219,6 @@ mwifiex-bring-down-link-before-deleting-interface.patch
 i40e-fix-ptp-on-5gb-links.patch
 qemu_fw_cfg-make-fw_cfg_rev_attr-a-proper-kobj_attribute.patch
 ipmi-watchdog-stop-watchdog-timer-when-the-current-action-is-none.patch
-xfrm-policy-read-seqcount-outside-of-rcu-read-side-in-xfrm_policy_lookup_bytype.patch
 thermal-drivers-int340x-processor_thermal-fix-tcc-setting.patch
 ubifs-fix-races-between-xattr_-set-get-and-listxattr-operations.patch
 power-supply-ab8500-fix-an-old-bug.patch
diff --git a/queue-5.13/xfrm-policy-read-seqcount-outside-of-rcu-read-side-in-xfrm_policy_lookup_bytype.patch b/queue-5.13/xfrm-policy-read-seqcount-outside-of-rcu-read-side-in-xfrm_policy_lookup_bytype.patch
deleted file mode 100644 (file)
index 853a74a..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-From d7b0408934c749f546b01f2b33d07421a49b6f3e Mon Sep 17 00:00:00 2001
-From: Varad Gautam <varad.gautam@suse.com>
-Date: Fri, 28 May 2021 18:04:06 +0200
-Subject: xfrm: policy: Read seqcount outside of rcu-read side in xfrm_policy_lookup_bytype
-
-From: Varad Gautam <varad.gautam@suse.com>
-
-commit d7b0408934c749f546b01f2b33d07421a49b6f3e upstream.
-
-xfrm_policy_lookup_bytype loops on seqcount mutex xfrm_policy_hash_generation
-within an RCU read side critical section. Although ill advised, this is fine if
-the loop is bounded.
-
-xfrm_policy_hash_generation wraps mutex hash_resize_mutex, which is used to
-serialize writers (xfrm_hash_resize, xfrm_hash_rebuild). This is fine too.
-
-On PREEMPT_RT=y, the read_seqcount_begin call within xfrm_policy_lookup_bytype
-emits a mutex lock/unlock for hash_resize_mutex. Mutex locking is fine, since
-RCU read side critical sections are allowed to sleep with PREEMPT_RT.
-
-xfrm_hash_resize can, however, block on synchronize_rcu while holding
-hash_resize_mutex.
-
-This leads to the following situation on PREEMPT_RT, where the writer is
-blocked on RCU grace period expiry, while the reader is blocked on a lock held
-by the writer:
-
-Thead 1 (xfrm_hash_resize)     Thread 2 (xfrm_policy_lookup_bytype)
-
-                               rcu_read_lock();
-mutex_lock(&hash_resize_mutex);
-                               read_seqcount_begin(&xfrm_policy_hash_generation);
-                               mutex_lock(&hash_resize_mutex); // block
-xfrm_bydst_resize();
-synchronize_rcu(); // block
-               <RCU stalls in xfrm_policy_lookup_bytype>
-
-Move the read_seqcount_begin call outside of the RCU read side critical section,
-and do an rcu_read_unlock/retry if we got stale data within the critical section.
-
-On non-PREEMPT_RT, this shortens the time spent within RCU read side critical
-section in case the seqcount needs a retry, and avoids unbounded looping.
-
-Fixes: 77cc278f7b20 ("xfrm: policy: Use sequence counters with associated lock")
-Signed-off-by: Varad Gautam <varad.gautam@suse.com>
-Cc: linux-rt-users <linux-rt-users@vger.kernel.org>
-Cc: netdev@vger.kernel.org
-Cc: stable@vger.kernel.org # v4.9
-Cc: Steffen Klassert <steffen.klassert@secunet.com>
-Cc: Herbert Xu <herbert@gondor.apana.org.au>
-Cc: "David S. Miller" <davem@davemloft.net>
-Cc: Jakub Kicinski <kuba@kernel.org>
-Cc: Florian Westphal <fw@strlen.de>
-Cc: "Ahmed S. Darwish" <a.darwish@linutronix.de>
-Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
-Acked-by: Ahmed S. Darwish <a.darwish@linutronix.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- net/xfrm/xfrm_policy.c |   21 ++++++++++++++-------
- 1 file changed, 14 insertions(+), 7 deletions(-)
-
---- a/net/xfrm/xfrm_policy.c
-+++ b/net/xfrm/xfrm_policy.c
-@@ -2092,12 +2092,15 @@ static struct xfrm_policy *xfrm_policy_l
-       if (unlikely(!daddr || !saddr))
-               return NULL;
--      rcu_read_lock();
-  retry:
--      do {
--              sequence = read_seqcount_begin(&xfrm_policy_hash_generation);
--              chain = policy_hash_direct(net, daddr, saddr, family, dir);
--      } while (read_seqcount_retry(&xfrm_policy_hash_generation, sequence));
-+      sequence = read_seqcount_begin(&xfrm_policy_hash_generation);
-+      rcu_read_lock();
-+
-+      chain = policy_hash_direct(net, daddr, saddr, family, dir);
-+      if (read_seqcount_retry(&xfrm_policy_hash_generation, sequence)) {
-+              rcu_read_unlock();
-+              goto retry;
-+      }
-       ret = NULL;
-       hlist_for_each_entry_rcu(pol, chain, bydst) {
-@@ -2128,11 +2131,15 @@ static struct xfrm_policy *xfrm_policy_l
-       }
- skip_inexact:
--      if (read_seqcount_retry(&xfrm_policy_hash_generation, sequence))
-+      if (read_seqcount_retry(&xfrm_policy_hash_generation, sequence)) {
-+              rcu_read_unlock();
-               goto retry;
-+      }
--      if (ret && !xfrm_pol_hold_rcu(ret))
-+      if (ret && !xfrm_pol_hold_rcu(ret)) {
-+              rcu_read_unlock();
-               goto retry;
-+      }
- fail:
-       rcu_read_unlock();
diff --git a/queue-5.4/net-moxa-use-devm_platform_get_and_ioremap_resource.patch b/queue-5.4/net-moxa-use-devm_platform_get_and_ioremap_resource.patch
deleted file mode 100644 (file)
index 1a41381..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-From ae8621da378ce782ab29674d14a413c64fbd4bce Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 7 Jun 2021 23:02:59 +0800
-Subject: net: moxa: Use devm_platform_get_and_ioremap_resource()
-
-From: Yang Yingliang <yangyingliang@huawei.com>
-
-[ Upstream commit 35cba15a504bf4f585bb9d78f47b22b28a1a06b2 ]
-
-Use devm_platform_get_and_ioremap_resource() to simplify
-code and avoid a null-ptr-deref by checking 'res' in it.
-
-Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/net/ethernet/moxa/moxart_ether.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c
-index f70bb81e1ed6..9f7eaae51335 100644
---- a/drivers/net/ethernet/moxa/moxart_ether.c
-+++ b/drivers/net/ethernet/moxa/moxart_ether.c
-@@ -480,14 +480,13 @@ static int moxart_mac_probe(struct platform_device *pdev)
-       priv->ndev = ndev;
-       priv->pdev = pdev;
--      res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
--      ndev->base_addr = res->start;
--      priv->base = devm_ioremap_resource(p_dev, res);
-+      priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
-       if (IS_ERR(priv->base)) {
-               dev_err(p_dev, "devm_ioremap_resource failed\n");
-               ret = PTR_ERR(priv->base);
-               goto init_fail;
-       }
-+      ndev->base_addr = res->start;
-       spin_lock_init(&priv->txlock);
--- 
-2.30.2
-
index 32d8ee2ee1d73c1c9c7fa33c9d2993e43d05b0ff..99afd3023a39892fe63c00f15dca893867f6a320 100644 (file)
@@ -28,7 +28,6 @@ virtio_net-remove-bug-to-avoid-machine-dead.patch
 net-bcmgenet-check-return-value-after-calling-platfo.patch
 net-mvpp2-check-return-value-after-calling-platform_.patch
 net-micrel-check-return-value-after-calling-platform.patch
-net-moxa-use-devm_platform_get_and_ioremap_resource.patch
 drm-amd-display-update-scaling-settings-on-modeset.patch
 drm-amd-display-release-mst-resources-on-switch-from.patch
 drm-amd-display-set-dispclk_max_errdet_cycles-to-7.patch
@@ -94,7 +93,6 @@ mips-fix-mipsel-linux-ld-decompress.c-undefined-reference-to-memmove.patch
 asoc-tegra-set-driver_name-tegra-for-all-machine-drivers.patch
 qemu_fw_cfg-make-fw_cfg_rev_attr-a-proper-kobj_attribute.patch
 ipmi-watchdog-stop-watchdog-timer-when-the-current-action-is-none.patch
-xfrm-policy-read-seqcount-outside-of-rcu-read-side-in-xfrm_policy_lookup_bytype.patch
 thermal-drivers-int340x-processor_thermal-fix-tcc-setting.patch
 ubifs-fix-races-between-xattr_-set-get-and-listxattr-operations.patch
 power-supply-ab8500-fix-an-old-bug.patch
diff --git a/queue-5.4/xfrm-policy-read-seqcount-outside-of-rcu-read-side-in-xfrm_policy_lookup_bytype.patch b/queue-5.4/xfrm-policy-read-seqcount-outside-of-rcu-read-side-in-xfrm_policy_lookup_bytype.patch
deleted file mode 100644 (file)
index 232290e..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-From d7b0408934c749f546b01f2b33d07421a49b6f3e Mon Sep 17 00:00:00 2001
-From: Varad Gautam <varad.gautam@suse.com>
-Date: Fri, 28 May 2021 18:04:06 +0200
-Subject: xfrm: policy: Read seqcount outside of rcu-read side in xfrm_policy_lookup_bytype
-
-From: Varad Gautam <varad.gautam@suse.com>
-
-commit d7b0408934c749f546b01f2b33d07421a49b6f3e upstream.
-
-xfrm_policy_lookup_bytype loops on seqcount mutex xfrm_policy_hash_generation
-within an RCU read side critical section. Although ill advised, this is fine if
-the loop is bounded.
-
-xfrm_policy_hash_generation wraps mutex hash_resize_mutex, which is used to
-serialize writers (xfrm_hash_resize, xfrm_hash_rebuild). This is fine too.
-
-On PREEMPT_RT=y, the read_seqcount_begin call within xfrm_policy_lookup_bytype
-emits a mutex lock/unlock for hash_resize_mutex. Mutex locking is fine, since
-RCU read side critical sections are allowed to sleep with PREEMPT_RT.
-
-xfrm_hash_resize can, however, block on synchronize_rcu while holding
-hash_resize_mutex.
-
-This leads to the following situation on PREEMPT_RT, where the writer is
-blocked on RCU grace period expiry, while the reader is blocked on a lock held
-by the writer:
-
-Thead 1 (xfrm_hash_resize)     Thread 2 (xfrm_policy_lookup_bytype)
-
-                               rcu_read_lock();
-mutex_lock(&hash_resize_mutex);
-                               read_seqcount_begin(&xfrm_policy_hash_generation);
-                               mutex_lock(&hash_resize_mutex); // block
-xfrm_bydst_resize();
-synchronize_rcu(); // block
-               <RCU stalls in xfrm_policy_lookup_bytype>
-
-Move the read_seqcount_begin call outside of the RCU read side critical section,
-and do an rcu_read_unlock/retry if we got stale data within the critical section.
-
-On non-PREEMPT_RT, this shortens the time spent within RCU read side critical
-section in case the seqcount needs a retry, and avoids unbounded looping.
-
-Fixes: 77cc278f7b20 ("xfrm: policy: Use sequence counters with associated lock")
-Signed-off-by: Varad Gautam <varad.gautam@suse.com>
-Cc: linux-rt-users <linux-rt-users@vger.kernel.org>
-Cc: netdev@vger.kernel.org
-Cc: stable@vger.kernel.org # v4.9
-Cc: Steffen Klassert <steffen.klassert@secunet.com>
-Cc: Herbert Xu <herbert@gondor.apana.org.au>
-Cc: "David S. Miller" <davem@davemloft.net>
-Cc: Jakub Kicinski <kuba@kernel.org>
-Cc: Florian Westphal <fw@strlen.de>
-Cc: "Ahmed S. Darwish" <a.darwish@linutronix.de>
-Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
-Acked-by: Ahmed S. Darwish <a.darwish@linutronix.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- net/xfrm/xfrm_policy.c |   21 ++++++++++++++-------
- 1 file changed, 14 insertions(+), 7 deletions(-)
-
---- a/net/xfrm/xfrm_policy.c
-+++ b/net/xfrm/xfrm_policy.c
-@@ -2089,12 +2089,15 @@ static struct xfrm_policy *xfrm_policy_l
-       if (unlikely(!daddr || !saddr))
-               return NULL;
--      rcu_read_lock();
-  retry:
--      do {
--              sequence = read_seqcount_begin(&xfrm_policy_hash_generation);
--              chain = policy_hash_direct(net, daddr, saddr, family, dir);
--      } while (read_seqcount_retry(&xfrm_policy_hash_generation, sequence));
-+      sequence = read_seqcount_begin(&xfrm_policy_hash_generation);
-+      rcu_read_lock();
-+
-+      chain = policy_hash_direct(net, daddr, saddr, family, dir);
-+      if (read_seqcount_retry(&xfrm_policy_hash_generation, sequence)) {
-+              rcu_read_unlock();
-+              goto retry;
-+      }
-       ret = NULL;
-       hlist_for_each_entry_rcu(pol, chain, bydst) {
-@@ -2125,11 +2128,15 @@ static struct xfrm_policy *xfrm_policy_l
-       }
- skip_inexact:
--      if (read_seqcount_retry(&xfrm_policy_hash_generation, sequence))
-+      if (read_seqcount_retry(&xfrm_policy_hash_generation, sequence)) {
-+              rcu_read_unlock();
-               goto retry;
-+      }
--      if (ret && !xfrm_pol_hold_rcu(ret))
-+      if (ret && !xfrm_pol_hold_rcu(ret)) {
-+              rcu_read_unlock();
-               goto retry;
-+      }
- fail:
-       rcu_read_unlock();