netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/af_unix: Remove unused old_pid variable
@ 2020-10-11 15:35 Or Cohen
  2020-10-14  0:24 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Or Cohen @ 2020-10-11 15:35 UTC (permalink / raw)
  To: davem, netdev, linux-kernel; +Cc: Or Cohen

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 <orcohen@paloaltonetworks.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net/af_unix: Remove unused old_pid variable
  2020-10-11 15:35 [PATCH] net/af_unix: Remove unused old_pid variable Or Cohen
@ 2020-10-14  0:24 ` Jakub Kicinski
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2020-10-14  0:24 UTC (permalink / raw)
  To: Or Cohen; +Cc: davem, netdev, linux-kernel, Or Cohen

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 <orcohen@paloaltonetworks.com>

Applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-14  0:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-11 15:35 [PATCH] net/af_unix: Remove unused old_pid variable Or Cohen
2020-10-14  0:24 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).