diff options
author | Eric Dumazet <edumazet@google.com> | 2023-09-21 22:28:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-10-01 20:09:54 +0200 |
commit | 10bbf1652c1cca9819e98d56f3432c56d7a2d229 (patch) | |
tree | ab9494c905436ea6f2b9fa1bb979addd2d58da71 /drivers/net/ppp/pppoe.c | |
parent | openvswitch: reduce stack usage in do_execute_actions (diff) | |
download | linux-10bbf1652c1cca9819e98d56f3432c56d7a2d229.tar.xz linux-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 <edumazet@google.com>
Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ppp/pppoe.c')
-rw-r--r-- | drivers/net/ppp/pppoe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c index ba8b6bd8233c..8e7238e97d0a 100644 --- a/drivers/net/ppp/pppoe.c +++ b/drivers/net/ppp/pppoe.c @@ -877,7 +877,7 @@ static int pppoe_sendmsg(struct socket *sock, struct msghdr *m, skb->dev = dev; - skb->priority = sk->sk_priority; + skb->priority = READ_ONCE(sk->sk_priority); skb->protocol = cpu_to_be16(ETH_P_PPP_SES); ph = skb_put(skb, total_len + sizeof(struct pppoe_hdr)); |