]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Drop rtnetlink-move-rtnl_lock-handling-out-of-af_netlink.patch
authorSasha Levin <sashal@kernel.org>
Sun, 11 Aug 2024 21:17:11 +0000 (17:17 -0400)
committerSasha Levin <sashal@kernel.org>
Sun, 11 Aug 2024 21:17:11 +0000 (17:17 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-6.10/rtnetlink-move-rtnl_lock-handling-out-of-af_netlink.patch [deleted file]
queue-6.10/series

diff --git a/queue-6.10/rtnetlink-move-rtnl_lock-handling-out-of-af_netlink.patch b/queue-6.10/rtnetlink-move-rtnl_lock-handling-out-of-af_netlink.patch
deleted file mode 100644 (file)
index b249ef2..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-From f55180327012f0f847d9cd05ce4662c3e3d56e38 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 6 Jun 2024 12:29:05 -0700
-Subject: rtnetlink: move rtnl_lock handling out of af_netlink
-
-From: Jakub Kicinski <kuba@kernel.org>
-
-[ Upstream commit 5380d64f8d766576ac5c0f627418b2d0e1d2641f ]
-
-Now that we have an intermediate layer of code for handling
-rtnl-level netlink dump quirks, we can move the rtnl_lock
-taking there.
-
-For dump handlers with RTNL_FLAG_DUMP_SPLIT_NLM_DONE we can
-avoid taking rtnl_lock just to generate NLM_DONE, once again.
-
-Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
-Reviewed-by: Eric Dumazet <edumazet@google.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- net/core/rtnetlink.c     | 9 +++++++--
- net/netlink/af_netlink.c | 2 --
- 2 files changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
-index 5e589f0a62bc5..cb8792800cee8 100644
---- a/net/core/rtnetlink.c
-+++ b/net/core/rtnetlink.c
-@@ -6486,6 +6486,7 @@ static int rtnl_mdb_del(struct sk_buff *skb, struct nlmsghdr *nlh,
- static int rtnl_dumpit(struct sk_buff *skb, struct netlink_callback *cb)
- {
-+      const bool needs_lock = !(cb->flags & RTNL_FLAG_DUMP_UNLOCKED);
-       rtnl_dumpit_func dumpit = cb->data;
-       int err;
-@@ -6495,7 +6496,11 @@ static int rtnl_dumpit(struct sk_buff *skb, struct netlink_callback *cb)
-       if (!dumpit)
-               return 0;
-+      if (needs_lock)
-+              rtnl_lock();
-       err = dumpit(skb, cb);
-+      if (needs_lock)
-+              rtnl_unlock();
-       /* Old dump handlers used to send NLM_DONE as in a separate recvmsg().
-        * Some applications which parse netlink manually depend on this.
-@@ -6515,7 +6520,8 @@ static int rtnetlink_dump_start(struct sock *ssk, struct sk_buff *skb,
-                               const struct nlmsghdr *nlh,
-                               struct netlink_dump_control *control)
- {
--      if (control->flags & RTNL_FLAG_DUMP_SPLIT_NLM_DONE) {
-+      if (control->flags & RTNL_FLAG_DUMP_SPLIT_NLM_DONE ||
-+          !(control->flags & RTNL_FLAG_DUMP_UNLOCKED)) {
-               WARN_ON(control->data);
-               control->data = control->dump;
-               control->dump = rtnl_dumpit;
-@@ -6703,7 +6709,6 @@ static int __net_init rtnetlink_net_init(struct net *net)
-       struct netlink_kernel_cfg cfg = {
-               .groups         = RTNLGRP_MAX,
-               .input          = rtnetlink_rcv,
--              .cb_mutex       = &rtnl_mutex,
-               .flags          = NL_CFG_F_NONROOT_RECV,
-               .bind           = rtnetlink_bind,
-       };
-diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
-index fa9c090cf629e..8bbbe75e75dbe 100644
---- a/net/netlink/af_netlink.c
-+++ b/net/netlink/af_netlink.c
-@@ -2330,8 +2330,6 @@ static int netlink_dump(struct sock *sk, bool lock_taken)
-               cb->extack = &extack;
--              if (cb->flags & RTNL_FLAG_DUMP_UNLOCKED)
--                      extra_mutex = NULL;
-               if (extra_mutex)
-                       mutex_lock(extra_mutex);
-               nlk->dump_done_errno = cb->dump(skb, cb);
--- 
-2.43.0
-
index e9f4fbf190830244490a2acd357d9ea18d816f15..befc903cecebb3f07f643fc321aa059f1af9a7eb 100644 (file)
@@ -68,7 +68,6 @@ wifi-rtlwifi-handle-return-value-of-usb-init-tx-rx.patch
 wifi-ath12k-fix-memory-leak-in-ath12k_dp_rx_peer_fra.patch
 net-mlx5e-shampo-fix-invalid-wq-linked-list-unlink.patch
 selftests-bpf-fix-send_signal-test-with-nested-confi.patch
-rtnetlink-move-rtnl_lock-handling-out-of-af_netlink.patch
 wifi-rtw89-pci-fix-rx-tag-race-condition-resulting-i.patch
 net-reference-bpf_redirect_info-via-task_struct-on-p.patch
 af_unix-don-t-retry-after-unix_state_lock_nested-in-.patch