diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2024-01-23 20:08:53 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-02 17:18:29 +0300 |
commit | 7f4c391d3b549248118c5227679f6745098c2726 (patch) | |
tree | c21d466b6754218fd319f41cdc7efe85519a5658 /include | |
parent | 1263b0b26077b1183c3c45a0a2479573a351d423 (diff) | |
download | linux-7f4c391d3b549248118c5227679f6745098c2726.tar.xz |
af_unix: Do not use atomic ops for unix_sk(sk)->inflight.
[ Upstream commit 97af84a6bba2ab2b9c704c08e67de3b5ea551bb2 ]
When touching unix_sk(sk)->inflight, we are always under
spin_lock(&unix_gc_lock).
Let's convert unix_sk(sk)->inflight to the normal unsigned long.
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240123170856.41348-3-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 47d8ac011fe1 ("af_unix: Fix garbage collector racing against connect()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/af_unix.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/af_unix.h b/include/net/af_unix.h index 6cb5026cf727..e7612295b262 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h @@ -52,7 +52,7 @@ struct unix_sock { struct mutex iolock, bindlock; struct sock *peer; struct list_head link; - atomic_long_t inflight; + unsigned long inflight; spinlock_t lock; unsigned long gc_flags; #define UNIX_GC_CANDIDATE 0 |