Skip to content

Commit c9bf52a

Browse files
0xOrcokuba-moo
authored andcommitted
net/af_unix: Remove unused old_pid variable
Commit 109f6e3 ("af_unix: Allow SO_PEERCRED to work across namespaces.") introduced the old_pid variable in unix_listen, but it's never used. Remove the declaration and the call to put_pid. Signed-off-by: Or Cohen <orcohen@paloaltonetworks.com> Link: https://lore.kernel.org/r/20201011153527.18628-1-orcohen@paloaltonetworks.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 0403a2b commit c9bf52a

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

‎net/unix/af_unix.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,6 @@ static int unix_listen(struct socket *sock, int backlog)
613613
int err;
614614
struct sock *sk = sock->sk;
615615
struct unix_sock *u = unix_sk(sk);
616-
struct pid *old_pid = NULL;
617616

618617
err = -EOPNOTSUPP;
619618
if (sock->type != SOCK_STREAM && sock->type != SOCK_SEQPACKET)
@@ -634,7 +633,6 @@ static int unix_listen(struct socket *sock, int backlog)
634633

635634
out_unlock:
636635
unix_state_unlock(sk);
637-
put_pid(old_pid);
638636
out:
639637
return err;
640638
}

0 commit comments

Comments
 (0)