Patch "mptcp: pm: check add_addr_accept_max before accepting new ADD_ADDR" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mptcp: pm: check add_addr_accept_max before accepting new ADD_ADDR

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mptcp-pm-check-add_addr_accept_max-before-accepting-.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit d1c5f7b0694f3daf21351597a8f311400f8bee9a
Author: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>
Date:   Mon Aug 19 21:45:28 2024 +0200

    mptcp: pm: check add_addr_accept_max before accepting new ADD_ADDR
    
    [ Upstream commit 0137a3c7c2ea3f9df8ebfc65d78b4ba712a187bb ]
    
    The limits might have changed in between, it is best to check them
    before accepting new ADD_ADDR.
    
    Fixes: d0876b2284cf ("mptcp: add the incoming RM_ADDR support")
    Cc: stable@xxxxxxxxxxxxxxx
    Reviewed-by: Mat Martineau <martineau@xxxxxxxxxx>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>
    Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-10-38035d40de5b@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index d546e17063f75..9e16ae1b23fc7 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -870,8 +870,8 @@ static void mptcp_pm_nl_rm_addr_or_subflow(struct mptcp_sock *msk,
 			/* Note: if the subflow has been closed before, this
 			 * add_addr_accepted counter will not be decremented.
 			 */
-			msk->pm.add_addr_accepted--;
-			WRITE_ONCE(msk->pm.accept_addr, true);
+			if (--msk->pm.add_addr_accepted < mptcp_pm_get_add_addr_accept_max(msk))
+				WRITE_ONCE(msk->pm.accept_addr, true);
 		}
 	}
 }




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux