diff for duplicates of <20241119083547.3234013-15-matttbe@kernel.org> diff --git a/a/1.txt b/N1/1.txt index 0f57f92..79ee454 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,68 +1,87 @@ -From: Geliang Tang <tanggeliang@kylinos.cn> +[ Sasha's backport helper bot ] -commit af250c27ea1c404e210fc3a308b20f772df584d6 upstream. +Hi, -When the lookup_by_id parameter of __lookup_addr() is true, it's the same -as __lookup_addr_by_id(), it can be replaced by __lookup_addr_by_id() -directly. So drop this parameter, let __lookup_addr() only looks up address -on the local address list by comparing addresses in it, not address ids. +The upstream commit SHA1 provided is correct: af250c27ea1c404e210fc3a308b20f772df584d6 -Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> -Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> -Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> -Link: https://lore.kernel.org/r/20240305-upstream-net-next-20240304-mptcp-misc-cleanup-v1-4-c436ba5e569b@kernel.org -Signed-off-by: Jakub Kicinski <kuba@kernel.org> -Stable-dep-of: db3eab8110bc ("mptcp: pm: use _rcu variant under rcu_read_lock") -[ Conflicts in pm_netlink.c, because commit 6a42477fe449 ("mptcp: update - set_flags interfaces") is not in this version, and causes too many - conflicts when backporting it. The conflict is easy to resolve: addr - is a pointer here here in mptcp_pm_nl_set_flags(), the rest of the - code is the same. ] -Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> ---- - net/mptcp/pm_netlink.c | 12 +++++------- - 1 file changed, 5 insertions(+), 7 deletions(-) +WARNING: Author mismatch between patch and upstream commit: +Backport author: "Matthieu Baerts (NGI0)" <matttbe@kernel.org> +Commit author: Geliang Tang <tanggeliang@kylinos.cn> -diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c -index 49e8156f5388..9b65d9360976 100644 ---- a/net/mptcp/pm_netlink.c -+++ b/net/mptcp/pm_netlink.c -@@ -525,15 +525,12 @@ __lookup_addr_by_id(struct pm_nl_pernet *pernet, unsigned int id) - } - - static struct mptcp_pm_addr_entry * --__lookup_addr(struct pm_nl_pernet *pernet, const struct mptcp_addr_info *info, -- bool lookup_by_id) -+__lookup_addr(struct pm_nl_pernet *pernet, const struct mptcp_addr_info *info) - { - struct mptcp_pm_addr_entry *entry; - - list_for_each_entry(entry, &pernet->local_addr_list, list) { -- if ((!lookup_by_id && -- mptcp_addresses_equal(&entry->addr, info, entry->addr.port)) || -- (lookup_by_id && entry->addr.id == info->id)) -+ if (mptcp_addresses_equal(&entry->addr, info, entry->addr.port)) - return entry; - } - return NULL; -@@ -564,7 +561,7 @@ static void mptcp_pm_create_subflow_or_signal_addr(struct mptcp_sock *msk) - - mptcp_local_address((struct sock_common *)msk->first, &mpc_addr); - rcu_read_lock(); -- entry = __lookup_addr(pernet, &mpc_addr, false); -+ entry = __lookup_addr(pernet, &mpc_addr); - if (entry) { - __clear_bit(entry->addr.id, msk->pm.id_avail_bitmap); - msk->mpc_endpoint_id = entry->addr.id; -@@ -2081,7 +2078,8 @@ static int mptcp_nl_cmd_set_flags(struct sk_buff *skb, struct genl_info *info) - token, &addr, &remote, bkup); + +Status in newer kernel trees: +6.11.y | Present (exact SHA1) +6.6.y | Not found +6.1.y | Not found + +Note: The patch differs from the upstream commit: +--- +--- - 2024-11-19 09:24:03.249399574 -0500 ++++ /tmp/tmp.2tsnXkauzv 2024-11-19 09:24:03.244329130 -0500 +@@ -1,3 +1,5 @@ ++commit af250c27ea1c404e210fc3a308b20f772df584d6 upstream. ++ + When the lookup_by_id parameter of __lookup_addr() is true, it's the same + as __lookup_addr_by_id(), it can be replaced by __lookup_addr_by_id() + directly. So drop this parameter, let __lookup_addr() only looks up address +@@ -8,15 +10,22 @@ + Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> + Link: https://lore.kernel.org/r/20240305-upstream-net-next-20240304-mptcp-misc-cleanup-v1-4-c436ba5e569b@kernel.org + Signed-off-by: Jakub Kicinski <kuba@kernel.org> ++Stable-dep-of: db3eab8110bc ("mptcp: pm: use _rcu variant under rcu_read_lock") ++[ Conflicts in pm_netlink.c, because commit 6a42477fe449 ("mptcp: update ++ set_flags interfaces") is not in this version, and causes too many ++ conflicts when backporting it. The conflict is easy to resolve: addr ++ is a pointer here here in mptcp_pm_nl_set_flags(), the rest of the ++ code is the same. ] ++Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> + --- + net/mptcp/pm_netlink.c | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) - spin_lock_bh(&pernet->lock); -- entry = __lookup_addr(pernet, &addr.addr, lookup_by_id); -+ entry = lookup_by_id ? __lookup_addr_by_id(pernet, addr.addr.id) : -+ __lookup_addr(pernet, &addr.addr); - if (!entry) { - spin_unlock_bh(&pernet->lock); - return -EINVAL; --- -2.45.2 + diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c +-index 354083b8386f0..5c17d39146ea2 100644 ++index 49e8156f5388..9b65d9360976 100644 + --- a/net/mptcp/pm_netlink.c + +++ b/net/mptcp/pm_netlink.c +-@@ -499,15 +499,12 @@ __lookup_addr_by_id(struct pm_nl_pernet *pernet, unsigned int id) ++@@ -525,15 +525,12 @@ __lookup_addr_by_id(struct pm_nl_pernet *pernet, unsigned int id) + } + + static struct mptcp_pm_addr_entry * +@@ -34,7 +43,7 @@ + return entry; + } + return NULL; +-@@ -537,7 +534,7 @@ static void mptcp_pm_create_subflow_or_signal_addr(struct mptcp_sock *msk) ++@@ -564,7 +561,7 @@ static void mptcp_pm_create_subflow_or_signal_addr(struct mptcp_sock *msk) + + mptcp_local_address((struct sock_common *)msk->first, &mpc_addr); + rcu_read_lock(); +@@ -43,8 +52,8 @@ + if (entry) { + __clear_bit(entry->addr.id, msk->pm.id_avail_bitmap); + msk->mpc_endpoint_id = entry->addr.id; +-@@ -1918,7 +1915,8 @@ int mptcp_pm_nl_set_flags(struct sk_buff *skb, struct genl_info *info) +- bkup = 1; ++@@ -2081,7 +2078,8 @@ static int mptcp_nl_cmd_set_flags(struct sk_buff *skb, struct genl_info *info) ++ token, &addr, &remote, bkup); + + spin_lock_bh(&pernet->lock); + - entry = __lookup_addr(pernet, &addr.addr, lookup_by_id); +@@ -52,4 +61,7 @@ + + __lookup_addr(pernet, &addr.addr); + if (!entry) { + spin_unlock_bh(&pernet->lock); +- GENL_SET_ERR_MSG(info, "address not found"); ++ return -EINVAL; ++-- ++2.45.2 ++ +--- + +Results of testing on various branches: + +| Branch | Patch Apply | Build Test | +|---------------------------|-------------|------------| +| stable/linux-6.1.y | Success | Success | diff --git a/a/content_digest b/N1/content_digest index a7dac02..e18c911 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,83 +1,97 @@ - "ref\020241119083547.3234013-9-matttbe@kernel.org\0" - "From\0Matthieu Baerts (NGI0) <matttbe@kernel.org>\0" - "Subject\0[PATCH 6.1.y 6/7] mptcp: drop lookup_by_id in lookup_addr\0" - "Date\0Tue, 19 Nov 2024 09:35:54 +0100\0" - "To\0mptcp@lists.linux.dev" - stable@vger.kernel.org - " gregkh@linuxfoundation.org\0" - "Cc\0Geliang Tang <tanggeliang@kylinos.cn>" - sashal@kernel.org - Matthieu Baerts <matttbe@kernel.org> - " Jakub Kicinski <kuba@kernel.org>\0" + "From\0Sasha Levin <sashal@kernel.org>\0" + "Subject\0Re: [PATCH 6.1.y 6/7] mptcp: drop lookup_by_id in lookup_addr\0" + "Date\0Tue, 19 Nov 2024 09:46:42 -0500\0" + "To\0stable@vger.kernel.org\0" + "Cc\0Matthieu Baerts (NGI0) <matttbe@kernel.org>" + " Sasha Levin <sashal@kernel.org>\0" "\00:1\0" "b\0" - "From: Geliang Tang <tanggeliang@kylinos.cn>\n" + "[ Sasha's backport helper bot ]\n" "\n" - "commit af250c27ea1c404e210fc3a308b20f772df584d6 upstream.\n" + "Hi,\n" "\n" - "When the lookup_by_id parameter of __lookup_addr() is true, it's the same\n" - "as __lookup_addr_by_id(), it can be replaced by __lookup_addr_by_id()\n" - "directly. So drop this parameter, let __lookup_addr() only looks up address\n" - "on the local address list by comparing addresses in it, not address ids.\n" + "The upstream commit SHA1 provided is correct: af250c27ea1c404e210fc3a308b20f772df584d6\n" "\n" - "Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>\n" - "Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>\n" - "Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>\n" - "Link: https://lore.kernel.org/r/20240305-upstream-net-next-20240304-mptcp-misc-cleanup-v1-4-c436ba5e569b@kernel.org\n" - "Signed-off-by: Jakub Kicinski <kuba@kernel.org>\n" - "Stable-dep-of: db3eab8110bc (\"mptcp: pm: use _rcu variant under rcu_read_lock\")\n" - "[ Conflicts in pm_netlink.c, because commit 6a42477fe449 (\"mptcp: update\n" - " set_flags interfaces\") is not in this version, and causes too many\n" - " conflicts when backporting it. The conflict is easy to resolve: addr\n" - " is a pointer here here in mptcp_pm_nl_set_flags(), the rest of the\n" - " code is the same. ]\n" - "Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>\n" - "---\n" - " net/mptcp/pm_netlink.c | 12 +++++-------\n" - " 1 file changed, 5 insertions(+), 7 deletions(-)\n" + "WARNING: Author mismatch between patch and upstream commit:\n" + "Backport author: \"Matthieu Baerts (NGI0)\" <matttbe@kernel.org>\n" + "Commit author: Geliang Tang <tanggeliang@kylinos.cn>\n" "\n" - "diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c\n" - "index 49e8156f5388..9b65d9360976 100644\n" - "--- a/net/mptcp/pm_netlink.c\n" - "+++ b/net/mptcp/pm_netlink.c\n" - "@@ -525,15 +525,12 @@ __lookup_addr_by_id(struct pm_nl_pernet *pernet, unsigned int id)\n" - " }\n" - " \n" - " static struct mptcp_pm_addr_entry *\n" - "-__lookup_addr(struct pm_nl_pernet *pernet, const struct mptcp_addr_info *info,\n" - "-\t bool lookup_by_id)\n" - "+__lookup_addr(struct pm_nl_pernet *pernet, const struct mptcp_addr_info *info)\n" - " {\n" - " \tstruct mptcp_pm_addr_entry *entry;\n" - " \n" - " \tlist_for_each_entry(entry, &pernet->local_addr_list, list) {\n" - "-\t\tif ((!lookup_by_id &&\n" - "-\t\t mptcp_addresses_equal(&entry->addr, info, entry->addr.port)) ||\n" - "-\t\t (lookup_by_id && entry->addr.id == info->id))\n" - "+\t\tif (mptcp_addresses_equal(&entry->addr, info, entry->addr.port))\n" - " \t\t\treturn entry;\n" - " \t}\n" - " \treturn NULL;\n" - "@@ -564,7 +561,7 @@ static void mptcp_pm_create_subflow_or_signal_addr(struct mptcp_sock *msk)\n" - " \n" - " \t\tmptcp_local_address((struct sock_common *)msk->first, &mpc_addr);\n" - " \t\trcu_read_lock();\n" - "-\t\tentry = __lookup_addr(pernet, &mpc_addr, false);\n" - "+\t\tentry = __lookup_addr(pernet, &mpc_addr);\n" - " \t\tif (entry) {\n" - " \t\t\t__clear_bit(entry->addr.id, msk->pm.id_avail_bitmap);\n" - " \t\t\tmsk->mpc_endpoint_id = entry->addr.id;\n" - "@@ -2081,7 +2078,8 @@ static int mptcp_nl_cmd_set_flags(struct sk_buff *skb, struct genl_info *info)\n" - " \t\t\t\t\t\t token, &addr, &remote, bkup);\n" + "\n" + "Status in newer kernel trees:\n" + "6.11.y | Present (exact SHA1)\n" + "6.6.y | Not found\n" + "6.1.y | Not found\n" + "\n" + "Note: The patch differs from the upstream commit:\n" + "---\n" + "--- -\t2024-11-19 09:24:03.249399574 -0500\n" + "+++ /tmp/tmp.2tsnXkauzv\t2024-11-19 09:24:03.244329130 -0500\n" + "@@ -1,3 +1,5 @@\n" + "+commit af250c27ea1c404e210fc3a308b20f772df584d6 upstream.\n" + "+\n" + " When the lookup_by_id parameter of __lookup_addr() is true, it's the same\n" + " as __lookup_addr_by_id(), it can be replaced by __lookup_addr_by_id()\n" + " directly. So drop this parameter, let __lookup_addr() only looks up address\n" + "@@ -8,15 +10,22 @@\n" + " Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>\n" + " Link: https://lore.kernel.org/r/20240305-upstream-net-next-20240304-mptcp-misc-cleanup-v1-4-c436ba5e569b@kernel.org\n" + " Signed-off-by: Jakub Kicinski <kuba@kernel.org>\n" + "+Stable-dep-of: db3eab8110bc (\"mptcp: pm: use _rcu variant under rcu_read_lock\")\n" + "+[ Conflicts in pm_netlink.c, because commit 6a42477fe449 (\"mptcp: update\n" + "+ set_flags interfaces\") is not in this version, and causes too many\n" + "+ conflicts when backporting it. The conflict is easy to resolve: addr\n" + "+ is a pointer here here in mptcp_pm_nl_set_flags(), the rest of the\n" + "+ code is the same. ]\n" + "+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>\n" + " ---\n" + " net/mptcp/pm_netlink.c | 12 +++++-------\n" + " 1 file changed, 5 insertions(+), 7 deletions(-)\n" " \n" - " \tspin_lock_bh(&pernet->lock);\n" - "-\tentry = __lookup_addr(pernet, &addr.addr, lookup_by_id);\n" - "+\tentry = lookup_by_id ? __lookup_addr_by_id(pernet, addr.addr.id) :\n" - "+\t\t\t __lookup_addr(pernet, &addr.addr);\n" - " \tif (!entry) {\n" - " \t\tspin_unlock_bh(&pernet->lock);\n" - " \t\treturn -EINVAL;\n" - "-- \n" - 2.45.2 + " diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c\n" + "-index 354083b8386f0..5c17d39146ea2 100644\n" + "+index 49e8156f5388..9b65d9360976 100644\n" + " --- a/net/mptcp/pm_netlink.c\n" + " +++ b/net/mptcp/pm_netlink.c\n" + "-@@ -499,15 +499,12 @@ __lookup_addr_by_id(struct pm_nl_pernet *pernet, unsigned int id)\n" + "+@@ -525,15 +525,12 @@ __lookup_addr_by_id(struct pm_nl_pernet *pernet, unsigned int id)\n" + " }\n" + " \n" + " static struct mptcp_pm_addr_entry *\n" + "@@ -34,7 +43,7 @@\n" + " \t\t\treturn entry;\n" + " \t}\n" + " \treturn NULL;\n" + "-@@ -537,7 +534,7 @@ static void mptcp_pm_create_subflow_or_signal_addr(struct mptcp_sock *msk)\n" + "+@@ -564,7 +561,7 @@ static void mptcp_pm_create_subflow_or_signal_addr(struct mptcp_sock *msk)\n" + " \n" + " \t\tmptcp_local_address((struct sock_common *)msk->first, &mpc_addr);\n" + " \t\trcu_read_lock();\n" + "@@ -43,8 +52,8 @@\n" + " \t\tif (entry) {\n" + " \t\t\t__clear_bit(entry->addr.id, msk->pm.id_avail_bitmap);\n" + " \t\t\tmsk->mpc_endpoint_id = entry->addr.id;\n" + "-@@ -1918,7 +1915,8 @@ int mptcp_pm_nl_set_flags(struct sk_buff *skb, struct genl_info *info)\n" + "- \t\tbkup = 1;\n" + "+@@ -2081,7 +2078,8 @@ static int mptcp_nl_cmd_set_flags(struct sk_buff *skb, struct genl_info *info)\n" + "+ \t\t\t\t\t\t token, &addr, &remote, bkup);\n" + " \n" + " \tspin_lock_bh(&pernet->lock);\n" + " -\tentry = __lookup_addr(pernet, &addr.addr, lookup_by_id);\n" + "@@ -52,4 +61,7 @@\n" + " +\t\t\t __lookup_addr(pernet, &addr.addr);\n" + " \tif (!entry) {\n" + " \t\tspin_unlock_bh(&pernet->lock);\n" + "- \t\tGENL_SET_ERR_MSG(info, \"address not found\");\n" + "+ \t\treturn -EINVAL;\n" + "+-- \n" + "+2.45.2\n" + "+\n" + "---\n" + "\n" + "Results of testing on various branches:\n" + "\n" + "| Branch | Patch Apply | Build Test |\n" + "|---------------------------|-------------|------------|\n" + | stable/linux-6.1.y | Success | Success | -fc03876e5f5acf2f8f9ab57996cf3caef591366296da584b53f2b90e2bdcee65 +8da8b9069a884dc0102e4ce157f9b11b6663ca2a8e8ab9a7873d7db457301306
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.