aboutsummaryrefslogtreecommitdiffstats
path: root/net/l2tp/l2tp_ip.c
diff options
context:
space:
mode:
authorEric Dumazet <[email protected]>2023-08-16 08:15:33 +0000
committerDavid S. Miller <[email protected]>2023-08-16 10:09:16 +0000
commitc274af2242693f59f00851b3660a21b10bcd76cc (patch)
tree9e6dff9911b9a0fd9b26f973ea89217f5ca29da0 /net/l2tp/l2tp_ip.c
parentMerge branch 'redundant-of_match_ptr' (diff)
downloadkernel-c274af2242693f59f00851b3660a21b10bcd76cc.tar.gz
kernel-c274af2242693f59f00851b3660a21b10bcd76cc.zip
inet: introduce inet->inet_flags
Various inet fields are currently racy. do_ip_setsockopt() and do_ip_getsockopt() are mostly holding the socket lock, but some (fast) paths do not. Use a new inet->inet_flags to hold atomic bits in the series. Remove inet->cmsg_flags, and use instead 9 bits from inet_flags. Signed-off-by: Eric Dumazet <[email protected]> Acked-by: Soheil Hassas Yeganeh <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/l2tp/l2tp_ip.c')
-rw-r--r--net/l2tp/l2tp_ip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c
index f9073bc7281f..9a2a9ed3ba47 100644
--- a/net/l2tp/l2tp_ip.c
+++ b/net/l2tp/l2tp_ip.c
@@ -552,7 +552,7 @@ static int l2tp_ip_recvmsg(struct sock *sk, struct msghdr *msg,
memset(&sin->sin_zero, 0, sizeof(sin->sin_zero));
*addr_len = sizeof(*sin);
}
- if (inet->cmsg_flags)
+ if (inet_cmsg_flags(inet))
ip_cmsg_recv(msg, skb);
if (flags & MSG_TRUNC)
copied = skb->len;