diff options
author | Brian Norris <computersforpeace@gmail.com> | 2017-06-01 13:53:55 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2017-06-01 13:53:55 -0400 |
commit | 05e97a9eda72d58dba293857df6aac62584ef99a (patch) | |
tree | e86e692f26d4879ff2210c54722e2b7780210249 /net/ipv4/tcp_input.c | |
parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) | |
parent | d4ed3b9015b5eebc90d629579d9e7944607cbae5 (diff) |
Merge tag 'nand/fixes-for-4.12-rc3' of git://git.infradead.org/linux-mtd into MTD
From Boris:
"""
This pull request contains several fixes to the core and the tango
driver.
tango fixes:
* Add missing MODULE_DEVICE_TABLE() in tango_nand.c
* Update the number of corrected bitflips
core fixes:
* Fix a long standing memory leak in nand_scan_tail()
* Fix several bugs introduced by the per-vendor init/detection
infrastructure (introduced in 4.12)
* Add a static specifier to nand_ooblayout_lp_hamming_ops definition
"""
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 5a3ad09e2786..174d4376baa5 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1179,13 +1179,14 @@ static int tcp_match_skb_to_sack(struct sock *sk, struct sk_buff *skb, | |||
1179 | */ | 1179 | */ |
1180 | if (pkt_len > mss) { | 1180 | if (pkt_len > mss) { |
1181 | unsigned int new_len = (pkt_len / mss) * mss; | 1181 | unsigned int new_len = (pkt_len / mss) * mss; |
1182 | if (!in_sack && new_len < pkt_len) { | 1182 | if (!in_sack && new_len < pkt_len) |
1183 | new_len += mss; | 1183 | new_len += mss; |
1184 | if (new_len >= skb->len) | ||
1185 | return 0; | ||
1186 | } | ||
1187 | pkt_len = new_len; | 1184 | pkt_len = new_len; |
1188 | } | 1185 | } |
1186 | |||
1187 | if (pkt_len >= skb->len && !in_sack) | ||
1188 | return 0; | ||
1189 | |||
1189 | err = tcp_fragment(sk, skb, pkt_len, mss, GFP_ATOMIC); | 1190 | err = tcp_fragment(sk, skb, pkt_len, mss, GFP_ATOMIC); |
1190 | if (err < 0) | 1191 | if (err < 0) |
1191 | return err; | 1192 | return err; |
@@ -3189,7 +3190,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets, | |||
3189 | int delta; | 3190 | int delta; |
3190 | 3191 | ||
3191 | /* Non-retransmitted hole got filled? That's reordering */ | 3192 | /* Non-retransmitted hole got filled? That's reordering */ |
3192 | if (reord < prior_fackets) | 3193 | if (reord < prior_fackets && reord <= tp->fackets_out) |
3193 | tcp_update_reordering(sk, tp->fackets_out - reord, 0); | 3194 | tcp_update_reordering(sk, tp->fackets_out - reord, 0); |
3194 | 3195 | ||
3195 | delta = tcp_is_fack(tp) ? pkts_acked : | 3196 | delta = tcp_is_fack(tp) ? pkts_acked : |