diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-22 23:47:14 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-22 23:49:37 -0500 |
commit | 3d02c2fdf870288589fe08d29e1255584f0d796e (patch) | |
tree | 45f52f6da4efb4c6a4c7a9cae5597d4bd83a0929 /net/unix/diag.c | |
parent | c86373faa01918197f4996eb155e188a0ab5b58b (diff) |
af_unix: convert to lock_cmp_fnlockdep_cmp_fn
It turns out there's a deadlock in this code that lockdep couldn't
detect because of incorrect use of nested locking.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'net/unix/diag.c')
-rw-r--r-- | net/unix/diag.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/unix/diag.c b/net/unix/diag.c index bec09a3a1d44..c2b0fc72f1f7 100644 --- a/net/unix/diag.c +++ b/net/unix/diag.c @@ -83,8 +83,10 @@ static int sk_diag_dump_icons(struct sock *sk, struct sk_buff *nlskb) * The state lock is outer for the same sk's * queue lock. With the other's queue locked it's * OK to lock the state. + * ??? + * What is the previous lock, what is our lock ordering? */ - unix_state_lock_nested(req); + unix_state_lock(req); peer = unix_sk(req)->peer; buf[i++] = (peer ? sock_i_ino(peer) : 0); unix_state_unlock(req); |