summaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-03-15 20:57:43 +0000
committerDavid S. Miller <davem@davemloft.net>2023-03-17 08:25:05 +0000
commit2f2d9972affae1f3282eff97c794cf843aedf61e (patch)
treec423dcc1166b12a9be8319f8def00d7c5385815e /fs/dlm
parent9a25f0cb0d7ee689f54f38890e66bc78520b0c62 (diff)
downloadlinux-2f2d9972affae1f3282eff97c794cf843aedf61e.tar.gz
linux-2f2d9972affae1f3282eff97c794cf843aedf61e.tar.bz2
linux-2f2d9972affae1f3282eff97c794cf843aedf61e.zip
net: annotate lockless accesses to sk->sk_err_soft
This field can be read/written without lock synchronization. tcp and dccp have been handled in different patches. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/lowcomms.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index a9b14f81d655..bd786b3be5ec 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -601,7 +601,7 @@ static void lowcomms_error_report(struct sock *sk)
"sk_err=%d/%d\n", dlm_our_nodeid(),
con->nodeid, &inet->inet_daddr,
ntohs(inet->inet_dport), sk->sk_err,
- sk->sk_err_soft);
+ READ_ONCE(sk->sk_err_soft));
break;
#if IS_ENABLED(CONFIG_IPV6)
case AF_INET6:
@@ -610,14 +610,15 @@ static void lowcomms_error_report(struct sock *sk)
"dport %d, sk_err=%d/%d\n", dlm_our_nodeid(),
con->nodeid, &sk->sk_v6_daddr,
ntohs(inet->inet_dport), sk->sk_err,
- sk->sk_err_soft);
+ READ_ONCE(sk->sk_err_soft));
break;
#endif
default:
printk_ratelimited(KERN_ERR "dlm: node %d: socket error "
"invalid socket family %d set, "
"sk_err=%d/%d\n", dlm_our_nodeid(),
- sk->sk_family, sk->sk_err, sk->sk_err_soft);
+ sk->sk_family, sk->sk_err,
+ READ_ONCE(sk->sk_err_soft));
break;
}