diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2024-06-20 13:56:20 -0700 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-06-25 11:10:18 +0200 |
commit | 8647ece4814f3bfdb5f7a8e19f882c9b89299a07 (patch) | |
tree | 01e58388818fbb445546716eb2e6a4a1d0bc471d /net/unix/sysctl_net_unix.c | |
parent | 7202cb591624b860bd7b688d4bd0f5bee79c7f44 (diff) | |
download | lwn-8647ece4814f3bfdb5f7a8e19f882c9b89299a07.tar.gz lwn-8647ece4814f3bfdb5f7a8e19f882c9b89299a07.zip |
af_unix: Define locking order for U_RECVQ_LOCK_EMBRYO in unix_collect_skb().
While GC is cleaning up cyclic references by SCM_RIGHTS,
unix_collect_skb() collects skb in the socket's recvq.
If the socket is TCP_LISTEN, we need to collect skb in the
embryo's queue. Then, both the listener's recvq lock and
the embroy's one are held.
The locking is always done in the listener -> embryo order.
Let's define it as unix_recvq_lock_cmp_fn() instead of using
spin_lock_nested().
Note that the reverse order is defined for consistency.
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions