summaryrefslogtreecommitdiffstats
path: root/include/net/inet_sock.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2023-08-24 07:26:06 +1000
committerDave Airlie <airlied@redhat.com>2023-08-24 07:26:06 +1000
commitfdebffeba8b877368ddcc139c26278c1c97931a4 (patch)
tree5ebf85a3e26d55ea388aa7a8608222205a4d59ba /include/net/inet_sock.h
parentcacaeb27ade4b793c456179bb6eda4592d206cd8 (diff)
parent706a741595047797872e669b3101429ab8d378ef (diff)
downloadlinux-stable-fdebffeba8b877368ddcc139c26278c1c97931a4.tar.gz
linux-stable-fdebffeba8b877368ddcc139c26278c1c97931a4.tar.bz2
linux-stable-fdebffeba8b877368ddcc139c26278c1c97931a4.zip
BackMerge tag 'v6.5-rc7' into drm-next
Linux 6.5-rc7 This is needed for the CI stuff and the msm pull has fixes in it. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/net/inet_sock.h')
-rw-r--r--include/net/inet_sock.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index caa20a905531..0bb32bfc6183 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -107,11 +107,12 @@ static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk)
static inline u32 inet_request_mark(const struct sock *sk, struct sk_buff *skb)
{
- if (!sk->sk_mark &&
- READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_fwmark_accept))
+ u32 mark = READ_ONCE(sk->sk_mark);
+
+ if (!mark && READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_fwmark_accept))
return skb->mark;
- return sk->sk_mark;
+ return mark;
}
static inline int inet_request_bound_dev_if(const struct sock *sk,