summaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2023-09-04 11:06:16 +0100
committerDavid S. Miller <davem@davemloft.net>2023-09-04 11:06:16 +0100
commit2861f09c11122127ac2fadc85c735844b7bb6d49 (patch)
tree332b4a89cd819ad45d81d5465c093852942323af /net/unix/af_unix.c
parent718e6b51298e0f254baca0d40ab52a00e004e014 (diff)
parentb192812905e4b134f7b7994b079eb647e9d2d37e (diff)
Merge branch 'af_unix-data-races'
Kuniyuki Iwashima says: ==================== af_unix: Fix four data-races. While running syzkaller, KCSAN reported 3 data-races with systemd-coredump using AF_UNIX sockets. This series fixes the three and another one inspiered by one of the reports. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r--net/unix/af_unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 86930a8ed012..3e8a04a13668 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -680,7 +680,7 @@ static void unix_release_sock(struct sock *sk, int embrion)
* What the above comment does talk about? --ANK(980817)
*/
- if (unix_tot_inflight)
+ if (READ_ONCE(unix_tot_inflight))
unix_gc(); /* Garbage collect fds */
}