Skip to content
Permalink
Browse files
inet: missing lock releases in udp.c
In method udp_get_first, the lock hslot->lock is not released when afinfo->family == AF_UNSPEC || sk->sk_family == afinfo->family is true. This patch fixes the problem by adding the unlock statement.

Signed-off-by: Ryan Cai <ycaibb@gmail.com>
  • Loading branch information
ycaibb authored and intel-lab-lkp committed Jan 21, 2022
1 parent 8aaaf2f commit 1b84613d303e1496ea759aa171b7b36dfd8f26c3
Showing 1 changed file with 1 addition and 0 deletions.
@@ -2975,6 +2975,7 @@ static struct sock *udp_get_first(struct seq_file *seq, int start)
continue;
if (afinfo->family == AF_UNSPEC ||
sk->sk_family == afinfo->family)
spin_unlock_bh(&hslot->lock);
goto found;
}
spin_unlock_bh(&hslot->lock);

0 comments on commit 1b84613

Please sign in to comment.