aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-06-06 17:30:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-06-06 17:30:17 -0400
commitb29794ec95c6856b316c2295904208bf11ffddd9 (patch)
tree3016cb5e694f1ef5d63e682841e7ec45e91a5d35 /net/ipv4/tcp.c
parente87f327ecd166e6cf0205e4e9b8003ec535add51 (diff)
parent1d3028f4c16487d63861ab6c68451768a7a109df (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Made TCP congestion control documentation match current reality, from Anmol Sarma. 2) Various build warning and failure fixes from Arnd Bergmann. 3) Fix SKB list leak in ipv6_gso_segment(). 4) Use after free in ravb driver, from Eugeniu Rosca. 5) Don't use udp_poll() in ping protocol driver, from Eric Dumazet. 6) Don't crash in PCI error recovery of cxgb4 driver, from Guilherme Piccoli. 7) _SRC_NAT_DONE_BIT needs to be cleared using atomics, from Liping Zhang. 8) Use after free in vxlan deletion, from Mark Bloch. 9) Fix ordering of NAPI poll enabled in ethoc driver, from Max Filippov. 10) Fix stmmac hangs with TSO, from Niklas Cassel. 11) Fix crash in CALIPSO ipv6, from Richard Haines. 12) Clear nh_flags properly on mpls link up. From Roopa Prabhu. 13) Fix regression in sk_err socket error queue handling, noticed by ping applications. From Soheil Hassas Yeganeh. 14) Update mlx4/mlx5 MAINTAINERS information. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (78 commits) net: stmmac: fix a broken u32 less than zero check net: stmmac: fix completely hung TX when using TSO net: ethoc: enable NAPI before poll may be scheduled net: bridge: fix a null pointer dereference in br_afspec ravb: Fix use-after-free on `ifconfig eth0 down` net/ipv6: Fix CALIPSO causing GPF with datagram support net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value Revert "sit: reload iphdr in ipip6_rcv" i40e/i40evf: proper update of the page_offset field i40e: Fix state flags for bit set and clean operations of PF iwlwifi: fix host command memory leaks iwlwifi: fix min API version for 7265D, 3168, 8000 and 8265 iwlwifi: mvm: clear new beacon command template struct iwlwifi: mvm: don't fail when removing a key from an inexisting sta iwlwifi: pcie: only use d0i3 in suspend/resume if system_pm is set to d0i3 iwlwifi: mvm: fix firmware debug restart recording iwlwifi: tt: move ucode_loaded check under mutex iwlwifi: mvm: support ibss in dqa mode iwlwifi: mvm: Fix command queue number on d0i3 flow iwlwifi: mvm: rs: start using LQ command color ...
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 59792d283ff8..b5ea036ca781 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2381,9 +2381,10 @@ static int tcp_repair_set_window(struct tcp_sock *tp, char __user *optbuf, int l
2381 return 0; 2381 return 0;
2382} 2382}
2383 2383
2384static int tcp_repair_options_est(struct tcp_sock *tp, 2384static int tcp_repair_options_est(struct sock *sk,
2385 struct tcp_repair_opt __user *optbuf, unsigned int len) 2385 struct tcp_repair_opt __user *optbuf, unsigned int len)
2386{ 2386{
2387 struct tcp_sock *tp = tcp_sk(sk);
2387 struct tcp_repair_opt opt; 2388 struct tcp_repair_opt opt;
2388 2389
2389 while (len >= sizeof(opt)) { 2390 while (len >= sizeof(opt)) {
@@ -2396,6 +2397,7 @@ static int tcp_repair_options_est(struct tcp_sock *tp,
2396 switch (opt.opt_code) { 2397 switch (opt.opt_code) {
2397 case TCPOPT_MSS: 2398 case TCPOPT_MSS:
2398 tp->rx_opt.mss_clamp = opt.opt_val; 2399 tp->rx_opt.mss_clamp = opt.opt_val;
2400 tcp_mtup_init(sk);
2399 break; 2401 break;
2400 case TCPOPT_WINDOW: 2402 case TCPOPT_WINDOW:
2401 { 2403 {
@@ -2555,7 +2557,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
2555 if (!tp->repair) 2557 if (!tp->repair)
2556 err = -EINVAL; 2558 err = -EINVAL;
2557 else if (sk->sk_state == TCP_ESTABLISHED) 2559 else if (sk->sk_state == TCP_ESTABLISHED)
2558 err = tcp_repair_options_est(tp, 2560 err = tcp_repair_options_est(sk,
2559 (struct tcp_repair_opt __user *)optval, 2561 (struct tcp_repair_opt __user *)optval,
2560 optlen); 2562 optlen);
2561 else 2563 else