[PATCH] net/af_unix: Remove unused old_pid variable

Subsystems: networking [general], networking [unix sockets], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Kuniyuki Iwashima, Linus Torvalds

STALE2203d LANDED

Status: Landed in mainline as c9bf52a173c7 on 2020-10-14.

2 messages, 2 authors, 2020-10-14 · open the first message on its own page

[PATCH] net/af_unix: Remove unused old_pid variable

From: Or Cohen <hidden>
Date: 2020-10-11 15:35:35

Commit 109f6e39fa07c48f5801 ("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 <redacted>
---
 net/unix/af_unix.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 3385a7a0b231..26d3bf81186f 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -613,7 +613,6 @@ static int unix_listen(struct socket *sock, int backlog)
 	int err;
 	struct sock *sk = sock->sk;
 	struct unix_sock *u = unix_sk(sk);
-	struct pid *old_pid = NULL;
 
 	err = -EOPNOTSUPP;
 	if (sock->type != SOCK_STREAM && sock->type != SOCK_SEQPACKET)
@@ -634,7 +633,6 @@ static int unix_listen(struct socket *sock, int backlog)
 
 out_unlock:
 	unix_state_unlock(sk);
-	put_pid(old_pid);
 out:
 	return err;
 }
-- 
2.17.1

Re: [PATCH] net/af_unix: Remove unused old_pid variable

From: Jakub Kicinski <kuba@kernel.org>
Date: 2020-10-14 00:24:12

On Sun, 11 Oct 2020 18:35:27 +0300 Or Cohen wrote:
Commit 109f6e39fa07c48f5801 ("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 <redacted>
Applied, thank you.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help