[PATCH] af_unux: old_cred is surplus

Subsystems: networking [general], networking [unix sockets], the rest

STALE5071d

2 messages, 2 authors, 2012-09-17 · open the first message on its own page

[PATCH] af_unux: old_cred is surplus

From: Alan Cox <hidden>
Date: 2012-09-17 10:34:13

From: Alan Cox <redacted>

Signed-off-by: Alan Cox <redacted>
---

 net/unix/af_unix.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 8a84ab6..5b5c876 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -441,7 +441,7 @@ static int unix_release_sock(struct sock *sk, int embrion)
 	/* ---- Socket is dead now and most probably destroyed ---- */
 
 	/*
-	 * Fixme: BSD difference: In BSD all sockets connected to use get
+	 * Fixme: BSD difference: In BSD all sockets connected to us get
 	 *	  ECONNRESET and we die on the spot. In Linux we behave
 	 *	  like files and pipes do and wait for the last
 	 *	  dereference.
@@ -481,7 +481,6 @@ static int unix_listen(struct socket *sock, int backlog)
 	struct sock *sk = sock->sk;
 	struct unix_sock *u = unix_sk(sk);
 	struct pid *old_pid = NULL;
-	const struct cred *old_cred = NULL;
 
 	err = -EOPNOTSUPP;
 	if (sock->type != SOCK_STREAM && sock->type != SOCK_SEQPACKET)
@@ -503,8 +502,6 @@ static int unix_listen(struct socket *sock, int backlog)
 out_unlock:
 	unix_state_unlock(sk);
 	put_pid(old_pid);
-	if (old_cred)
-		put_cred(old_cred);
 out:
 	return err;
 }

Re: [PATCH] af_unux: old_cred is surplus

From: David Miller <davem@davemloft.net>
Date: 2012-09-17 17:01:10

From: Alan Cox <redacted>
Date: Mon, 17 Sep 2012 11:52:41 +0100
From: Alan Cox <redacted>

Signed-off-by: Alan Cox <redacted>
Very amusing, you found it worthwhile to remove a typo from
a comment and add one to the subject of your commit message
at the same time.  It's a wash :-)

Applied to net-next with subject typo corrected.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help