[PATCH mptcp-next 1/7] mptcp: fix removing ids bitmap

Geliang Tang posted 7 patches 4 months, 2 weeks ago
Maintainers: Matthieu Baerts <matthieu.baerts@tessares.net>, Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Mat Martineau <mathew.j.martineau@linux.intel.com>, "David S. Miller" <davem@davemloft.net>
[PATCH mptcp-next 1/7] mptcp: fix removing ids bitmap
Posted by Geliang Tang 4 months, 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")
Signed-off-by: Geliang Tang <geliang.tang@suse.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;
 
-- 
2.31.1


Re: [PATCH mptcp-next 1/7] mptcp: fix removing ids bitmap
Posted by Paolo Abeni 4 months, 2 weeks ago
On Mon, 2022-01-10 at 11:29 +0800, 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")
> Signed-off-by: Geliang Tang <geliang.tang@suse.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;
>  

LGTM!

Acked-by: Paolo Abeni <pabeni@redhat.com>

I think this one could be spooled independently from the other patches,
so it could land on -net early.

WDYT?

Thanks!

Paolo


Re: [PATCH mptcp-next 1/7] mptcp: fix removing ids bitmap
Posted by Geliang Tang 4 months, 2 weeks ago
On Mon, Jan 10, 2022 at 12:40:14PM +0100, Paolo Abeni wrote:
> On Mon, 2022-01-10 at 11:29 +0800, 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")
> > Signed-off-by: Geliang Tang <geliang.tang@suse.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;
> >  
> 
> LGTM!
> 
> Acked-by: Paolo Abeni <pabeni@redhat.com>
> 
> I think this one could be spooled independently from the other patches,
> so it could land on -net early.
> 
> WDYT?

Great!

Matt, could you please help me to update the subject of this patch to
"mptcp: fix removing ids bitmap setting" when merging it?

Thanks,
-Geliang

> 
> Thanks!
> 
> Paolo
>