]> www.infradead.org Git - users/dwmw2/linux.git/commit
af_unix: Do not use atomic ops for unix_sk(sk)->inflight.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 23 Jan 2024 17:08:53 +0000 (09:08 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2024 09:15:15 +0000 (11:15 +0200)
commit37120fa8d92a43f538ff6b7646948a55cdbad266
tree960ea03a3a6d5a601a85bef15bbcebc4a39c73fa
parent22641478d80f169aef136e60cef4a824a0dafe1a
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>
include/net/af_unix.h
net/unix/af_unix.c
net/unix/garbage.c
net/unix/scm.c