Squash to "mptcp: add rm_list_tx in mptcp_pm_data"
Subsystems (2)
Geliang Tang
PATCH v2 1/1 Squash to "mptcp: add rm_list_tx in mptcp_pm_data"
Fix the length of RM_ADDR suboption in mptcp_pm_rm_addr_signal.
Signed-off-by Geliang Tang <geliangtang(a)gmail.com>
---
v2:
- clear msk->pm.addr_signal in the error case.
--- net/mptcp/pm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
net/mptcp/pm.c +7 -2
@@ -260,7 +260,7 @@ bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, unsigned int remaining,bool mptcp_pm_rm_addr_signal (struct mptcp_sock *msk,unsigned int remaining,struct mptcp_rm_list *rm_list) { -int ret = false; +int ret = false, len;spin_lock_bh (&msk->pm.lock);
@@ -268,7 +268,12 @@ bool mptcp_pm_rm_addr_signal(struct mptcp_sock *msk, unsigned int remaining,if (!mptcp_pm_should_rm_signal (msk)) goto out_unlock; -if (remaining <TCPOLEN_MPTCP_RM_ADDR_BASE ) + len =mptcp_rm_addr_len (msk->pm.rm_list_tx); +if (len <0 ) { +WRITE_ONCE (msk->pm.addr_signal,0 ); + goto out_unlock; + } +if (remaining < len) goto out_unlock; *rm_list = msk->pm.rm_list_tx;
Signature · 1 line
2.29.2
Mat Martineau
Quoted 39 lines · Geliang Tang
Fix the length of
RM_ADDRsuboption inmptcp_pm_rm_addr_signal.Signed-off-by Geliang Tang <geliangtang(a)gmail.com>---
v2:
- clearmsk->pm.addr_signalin the error case.
---net/mptcp/pm.c| 9 +++++++--1 file changed, 7 insertions(+), 2 deletions(-)net/mptcp/pm.c +7
-2@@ -260,7 +260,7 @@ bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, unsigned int remaining,bool mptcp_pm_rm_addr_signal (struct mptcp_sock *msk,unsigned int remaining,struct mptcp_rm_list *rm_list) { -int ret = false; +int ret = false, len;spin_lock_bh (&msk->pm.lock);@@ -268,7 +268,12 @@ bool mptcp_pm_rm_addr_signal(struct mptcp_sock *msk, unsigned int remaining,if (!mptcp_pm_should_rm_signal (msk)) goto out_unlock; -if (remaining <TCPOLEN_MPTCP_RM_ADDR_BASE ) + len =mptcp_rm_addr_len (msk->pm.rm_list_tx); +if (len <0 ) { +WRITE_ONCE (msk->pm.addr_signal,0 ); + goto out_unlock; + } +if (remaining < len) goto out_unlock; *rm_list = msk->pm.rm_list_tx;Signature · 1 line
2.29.2
Thanks for the v2, looks ready to squash.
--
Mat Martineau
Intel
Matthieu Baerts
Hi Geliang, Mat,
Quoted 1 line · Geliang Tang
Fix the length of
RM_ADDRsuboption inmptcp_pm_rm_addr_signal.
Thank you for the patch and the review!
- 2435fca3083c: "squashed" in "mptcp: add rm_list_tx in mptcp_pm_data"
- Results: 98202724d8a6..253897668c44
Tests + export are going to be started soon!
Cheers,
Matt
Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions www.tessares.net