diff options
author | Eric Dumazet <edumazet@google.com> | 2023-09-21 20:28:11 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-10-01 19:09:54 +0100 |
commit | 10bbf1652c1cca9819e98d56f3432c56d7a2d229 (patch) | |
tree | ab9494c905436ea6f2b9fa1bb979addd2d58da71 /net/mptcp | |
parent | 06bc3668cc2a6db2831b9086f0e3c6ebda599dba (diff) |
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 <edumazet@google.com>
Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp')
-rw-r--r-- | net/mptcp/sockopt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mptcp/sockopt.c b/net/mptcp/sockopt.c index 8260202c0066..f3485a6b35e7 100644 --- a/net/mptcp/sockopt.c +++ b/net/mptcp/sockopt.c @@ -89,7 +89,7 @@ static void mptcp_sol_socket_sync_intval(struct mptcp_sock *msk, int optname, in sock_valbool_flag(ssk, SOCK_KEEPOPEN, !!val); break; case SO_PRIORITY: - ssk->sk_priority = val; + WRITE_ONCE(ssk->sk_priority, val); break; case SO_SNDBUF: case SO_SNDBUFFORCE: |