mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
net: implement lockless SO_PRIORITY
This is a followup of 8bf43be799 ("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>
This commit is contained in:
committed by
David S. Miller
parent
06bc3668cc
commit
10bbf1652c
@@ -1449,7 +1449,7 @@ struct sk_buff *__ip_make_skb(struct sock *sk,
|
||||
ip_options_build(skb, opt, cork->addr, rt);
|
||||
}
|
||||
|
||||
skb->priority = (cork->tos != -1) ? cork->priority: sk->sk_priority;
|
||||
skb->priority = (cork->tos != -1) ? cork->priority: READ_ONCE(sk->sk_priority);
|
||||
skb->mark = cork->mark;
|
||||
skb->tstamp = cork->transmit_time;
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user