summaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2024-12-20 17:31:19 +0300
committerPeter Zijlstra <peterz@infradead.org>2024-12-20 17:31:19 +0300
commitc2db11a750fb626d0d04f2dc76e548a1f07617df (patch)
tree01c899b2a06855633ae991f2064242f976987809 /net/ipv4/tcp_output.c
parent63a48181fbcddefe5fb4c6618938bb64c543945b (diff)
parent4a077914578183ec397ad09f7156a357e00e5d72 (diff)
downloadlinux-c2db11a750fb626d0d04f2dc76e548a1f07617df.tar.xz
Merge branch 'locking/urgent'
Sync with urgent -- avoid conflicts. Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 5485a70b5fe5..0e5b9a654254 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -883,8 +883,10 @@ static unsigned int tcp_syn_options(struct sock *sk, struct sk_buff *skb,
unsigned int size;
if (mptcp_syn_options(sk, skb, &size, &opts->mptcp)) {
- opts->options |= OPTION_MPTCP;
- remaining -= size;
+ if (remaining >= size) {
+ opts->options |= OPTION_MPTCP;
+ remaining -= size;
+ }
}
}