[PATCH mptcp-next v2] mptcp: fix removing ids bitmap setting

Geliang Tang posted 1 patch 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/fd0d593b0f088f5024b7a9a5f292bae4e67d6dde.1641868302.git.geliang.tang@suse.com
Maintainers: "David S. Miller" <davem@davemloft.net>, Matthieu Baerts <matthieu.baerts@tessares.net>, Paolo Abeni <pabeni@redhat.com>, Mat Martineau <mathew.j.martineau@linux.intel.com>, Jakub Kicinski <kuba@kernel.org>
net/mptcp/pm_netlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH mptcp-next v2] mptcp: fix removing ids bitmap setting

Posted by Geliang Tang 2 weeks ago
In mptcp_pm_nl_rm_addr_or_subflow(), the bit of rm_list->ids[i] in the
id_avail_bitmap should be set, not rm_list->ids[1]. This patch fixed it.

Fixes: 86e39e04482b ("mptcp: keep track of local endpoint still available for each msk")
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 v2:
 - move out of the set fullmesh flag series.
 - update the subject name.
 - add Paolo's Acked-by tag.
---
 net/mptcp/pm_netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index f12effa71942..47ad00d01cf2 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -777,7 +777,7 @@ static void mptcp_pm_nl_rm_addr_or_subflow(struct mptcp_sock *msk,
 			removed = true;
 			__MPTCP_INC_STATS(sock_net(sk), rm_type);
 		}
-		__set_bit(rm_list->ids[1], msk->pm.id_avail_bitmap);
+		__set_bit(rm_list->ids[i], msk->pm.id_avail_bitmap);
 		if (!removed)
 			continue;
 
-- 
2.31.1


Re: [PATCH mptcp-next v2] mptcp: fix removing ids bitmap setting

Posted by Matthieu Baerts 1 week, 4 days ago
Hi Geliang, Mat, Paolo,

On 11/01/2022 03:37, Geliang Tang wrote:
> In mptcp_pm_nl_rm_addr_or_subflow(), the bit of rm_list->ids[i] in the
> id_avail_bitmap should be set, not rm_list->ids[1]. This patch fixed it.

Thank you for the patch and the reviews!

Now in our tree (fixes for -net) with Mat's RvB tag:

- 5fd49f91fdb8: mptcp: fix removing ids bitmap setting
- Results: 6eab36365cea..459ae9092f30

Builds and tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220113T102450
https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

Re: [PATCH mptcp-next v2] mptcp: fix removing ids bitmap setting

Posted by Mat Martineau 1 week, 6 days ago
On Tue, 11 Jan 2022, Geliang Tang wrote:

> In mptcp_pm_nl_rm_addr_or_subflow(), the bit of rm_list->ids[i] in the
> id_avail_bitmap should be set, not rm_list->ids[1]. This patch fixed it.
>
> Fixes: 86e39e04482b ("mptcp: keep track of local endpoint still available for each msk")
> Acked-by: Paolo Abeni <pabeni@redhat.com>
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
> v2:
> - move out of the set fullmesh flag series.
> - update the subject name.
> - add Paolo's Acked-by tag.

Geliang -

Thanks for catching this! I agree with Paolo, looks good for the export 
branch (mptcp-net section).

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>


> ---
> net/mptcp/pm_netlink.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
> index f12effa71942..47ad00d01cf2 100644
> --- a/net/mptcp/pm_netlink.c
> +++ b/net/mptcp/pm_netlink.c
> @@ -777,7 +777,7 @@ static void mptcp_pm_nl_rm_addr_or_subflow(struct mptcp_sock *msk,
> 			removed = true;
> 			__MPTCP_INC_STATS(sock_net(sk), rm_type);
> 		}
> -		__set_bit(rm_list->ids[1], msk->pm.id_avail_bitmap);
> +		__set_bit(rm_list->ids[i], msk->pm.id_avail_bitmap);
> 		if (!removed)
> 			continue;
>

--
Mat Martineau
Intel