mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 13:27:06 +09:00
Merge tag 'v4.9.274' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroidg12-4.9.y
Linux 4.9.274
This commit is contained in:
@@ -1688,7 +1688,8 @@ static inline u32 net_tx_rndhash(void)
|
||||
|
||||
static inline void sk_set_txhash(struct sock *sk)
|
||||
{
|
||||
sk->sk_txhash = net_tx_rndhash();
|
||||
/* This pairs with READ_ONCE() in skb_set_hash_from_sk() */
|
||||
WRITE_ONCE(sk->sk_txhash, net_tx_rndhash());
|
||||
}
|
||||
|
||||
static inline void sk_rethink_txhash(struct sock *sk)
|
||||
@@ -1943,9 +1944,12 @@ static inline void sock_poll_wait(struct file *filp,
|
||||
|
||||
static inline void skb_set_hash_from_sk(struct sk_buff *skb, struct sock *sk)
|
||||
{
|
||||
if (sk->sk_txhash) {
|
||||
/* This pairs with WRITE_ONCE() in sk_set_txhash() */
|
||||
u32 txhash = READ_ONCE(sk->sk_txhash);
|
||||
|
||||
if (txhash) {
|
||||
skb->l4_hash = 1;
|
||||
skb->hash = sk->sk_txhash;
|
||||
skb->hash = txhash;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user