summaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv4.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-05-13 11:55:45 -0700
committerDavid S. Miller <davem@davemloft.net>2022-05-16 10:31:06 +0100
commit36f7cec4f3af352d7f2c646461afba4cf7fd77b0 (patch)
treea485df3860e4ef1cebb569b227f0ea7a0509f5b5 /net/dccp/ipv4.c
parente5fccaa1eb7f6116deab0f708a787e2de915869f (diff)
downloadlinux-36f7cec4f3af352d7f2c646461afba4cf7fd77b0.tar.bz2
dccp: use READ_ONCE() to read sk->sk_bound_dev_if
When reading listener sk->sk_bound_dev_if locklessly, we must use READ_ONCE(). Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r--net/dccp/ipv4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 82696ab86f74..307424872160 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -628,7 +628,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
sk_daddr_set(req_to_sk(req), ip_hdr(skb)->saddr);
ireq->ir_mark = inet_request_mark(sk, skb);
ireq->ireq_family = AF_INET;
- ireq->ir_iif = sk->sk_bound_dev_if;
+ ireq->ir_iif = READ_ONCE(sk->sk_bound_dev_if);
/*
* Step 3: Process LISTEN state