diff options
| author | James Morris <james.l.morris@oracle.com> | 2012-09-28 13:37:32 +1000 | 
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2012-09-28 13:37:32 +1000 | 
| commit | bf5308344527d015ac9a6d2bda4ad4d40fd7d943 (patch) | |
| tree | 566e61e2cfc648c374d15cfc8c661b73e1a471f8 /net/ipv4/tcp.c | |
| parent | 3585e96cd1049682b8a19a0b699422156e9d735b (diff) | |
| parent | 979570e02981d4a8fc20b3cc8fd651856c98ee9d (diff) | |
| download | olio-linux-3.10-bf5308344527d015ac9a6d2bda4ad4d40fd7d943.tar.xz olio-linux-3.10-bf5308344527d015ac9a6d2bda4ad4d40fd7d943.zip  | |
Merge tag 'v3.6-rc7' into next
Linux 3.6-rc7
Requested by David Howells so he can merge his key susbsystem work into
my tree with requisite -linus changesets.
Diffstat (limited to 'net/ipv4/tcp.c')
| -rw-r--r-- | net/ipv4/tcp.c | 23 | 
1 files changed, 18 insertions, 5 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 2109ff4a1da..5f641934182 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1762,8 +1762,14 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,  		}  #ifdef CONFIG_NET_DMA -		if (tp->ucopy.dma_chan) -			dma_async_memcpy_issue_pending(tp->ucopy.dma_chan); +		if (tp->ucopy.dma_chan) { +			if (tp->rcv_wnd == 0 && +			    !skb_queue_empty(&sk->sk_async_wait_queue)) { +				tcp_service_net_dma(sk, true); +				tcp_cleanup_rbuf(sk, copied); +			} else +				dma_async_memcpy_issue_pending(tp->ucopy.dma_chan); +		}  #endif  		if (copied >= target) {  			/* Do not sleep, just process backlog. */ @@ -2325,10 +2331,17 @@ static int tcp_repair_options_est(struct tcp_sock *tp,  			tp->rx_opt.mss_clamp = opt.opt_val;  			break;  		case TCPOPT_WINDOW: -			if (opt.opt_val > 14) -				return -EFBIG; +			{ +				u16 snd_wscale = opt.opt_val & 0xFFFF; +				u16 rcv_wscale = opt.opt_val >> 16; + +				if (snd_wscale > 14 || rcv_wscale > 14) +					return -EFBIG; -			tp->rx_opt.snd_wscale = opt.opt_val; +				tp->rx_opt.snd_wscale = snd_wscale; +				tp->rx_opt.rcv_wscale = rcv_wscale; +				tp->rx_opt.wscale_ok = 1; +			}  			break;  		case TCPOPT_SACK_PERM:  			if (opt.opt_val != 0)  |