diff options
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index cd8a92e7a39e..e80eb1788f80 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -325,7 +325,7 @@ void tcp_enter_memory_pressure(struct sock *sk) | |||
325 | { | 325 | { |
326 | unsigned long val; | 326 | unsigned long val; |
327 | 327 | ||
328 | if (tcp_memory_pressure) | 328 | if (READ_ONCE(tcp_memory_pressure)) |
329 | return; | 329 | return; |
330 | val = jiffies; | 330 | val = jiffies; |
331 | 331 | ||
@@ -340,7 +340,7 @@ void tcp_leave_memory_pressure(struct sock *sk) | |||
340 | { | 340 | { |
341 | unsigned long val; | 341 | unsigned long val; |
342 | 342 | ||
343 | if (!tcp_memory_pressure) | 343 | if (!READ_ONCE(tcp_memory_pressure)) |
344 | return; | 344 | return; |
345 | val = xchg(&tcp_memory_pressure, 0); | 345 | val = xchg(&tcp_memory_pressure, 0); |
346 | if (val) | 346 | if (val) |
@@ -2507,6 +2507,7 @@ static void tcp_rtx_queue_purge(struct sock *sk) | |||
2507 | { | 2507 | { |
2508 | struct rb_node *p = rb_first(&sk->tcp_rtx_queue); | 2508 | struct rb_node *p = rb_first(&sk->tcp_rtx_queue); |
2509 | 2509 | ||
2510 | tcp_sk(sk)->highest_sack = NULL; | ||
2510 | while (p) { | 2511 | while (p) { |
2511 | struct sk_buff *skb = rb_to_skb(p); | 2512 | struct sk_buff *skb = rb_to_skb(p); |
2512 | 2513 | ||