diff options
| author | Eric Dumazet <[email protected]> | 2023-09-21 20:28:11 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2023-10-01 18:09:54 +0000 |
| commit | 10bbf1652c1cca9819e98d56f3432c56d7a2d229 (patch) | |
| tree | ab9494c905436ea6f2b9fa1bb979addd2d58da71 /net/ipv4/tcp_ipv4.c | |
| parent | openvswitch: reduce stack usage in do_execute_actions (diff) | |
| download | kernel-10bbf1652c1cca9819e98d56f3432c56d7a2d229.tar.gz kernel-10bbf1652c1cca9819e98d56f3432c56d7a2d229.zip | |
net: implement lockless SO_PRIORITY
This is a followup of 8bf43be799d4 ("net: annotate data-races
around sk->sk_priority").
sk->sk_priority can be read and written without holding the socket lock.
Signed-off-by: Eric Dumazet <[email protected]>
Reviewed-by: Wenjia Zhang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
| -rw-r--r-- | net/ipv4/tcp_ipv4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index f13eb7e23d03..95e972be0c05 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -828,7 +828,7 @@ static void tcp_v4_send_reset(const struct sock *sk, struct sk_buff *skb) ctl_sk->sk_mark = (sk->sk_state == TCP_TIME_WAIT) ? inet_twsk(sk)->tw_mark : sk->sk_mark; ctl_sk->sk_priority = (sk->sk_state == TCP_TIME_WAIT) ? - inet_twsk(sk)->tw_priority : sk->sk_priority; + inet_twsk(sk)->tw_priority : READ_ONCE(sk->sk_priority); transmit_time = tcp_transmit_time(sk); xfrm_sk_clone_policy(ctl_sk, sk); txhash = (sk->sk_state == TCP_TIME_WAIT) ? |
