While reading sysctl_tcp_comp_sack_delay_ns, it can be changed concurrently. Thus, we need to add READ_ONCE() to its reader.
Unified · Split
| @@ -5542,7 +5542,8 @@ send_now: · 5541 unmodified lines | |||
| 5542 | if (tp->srtt_us && tp->srtt_us < rtt) | 5542 | if (tp->srtt_us && tp->srtt_us < rtt) |
| 5543 | rtt = tp->srtt_us; | 5543 | rtt = tp->srtt_us; |
| 5544 | 5544 | ||
| 5545 | delay = min_t(unsigned long, sock_net(sk)->ipv4.sysctl_tcp_comp_sack_delay_ns, | 5545 | delay = min_t(unsigned long, |
| 5546 | READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_comp_sack_delay_ns), | ||
| 5546 | rtt * (NSEC_PER_USEC >> 3)/20); | 5547 | rtt * (NSEC_PER_USEC >> 3)/20); |
| 5547 | sock_hold(sk); | 5548 | sock_hold(sk); |
| 5548 | hrtimer_start_range_ns(&tp->compressed_ack_timer, ns_to_ktime(delay), | 5549 | hrtimer_start_range_ns(&tp->compressed_ack_timer, ns_to_ktime(delay), |