diff options
| author | Alan Cox <alan@linux.intel.com> | 2012-09-16 20:52:41 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2012-09-17 13:00:13 -0400 |
| commit | e04dae840883ca31cea01e5958c09eee005cf4de (patch) | |
| tree | 99c57921cf93189a0c7f251c322d2aec16d6d325 | |
| parent | e57b8bdb4833366fd23d03a066c7eb8acc5736c7 (diff) | |
af_unix: old_cred is surplus
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | net/unix/af_unix.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 8a84ab64cafd..5b5c876c80e9 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) | |||
| 441 | /* ---- Socket is dead now and most probably destroyed ---- */ | 441 | /* ---- Socket is dead now and most probably destroyed ---- */ |
| 442 | 442 | ||
| 443 | /* | 443 | /* |
| 444 | * Fixme: BSD difference: In BSD all sockets connected to use get | 444 | * Fixme: BSD difference: In BSD all sockets connected to us get |
| 445 | * ECONNRESET and we die on the spot. In Linux we behave | 445 | * ECONNRESET and we die on the spot. In Linux we behave |
| 446 | * like files and pipes do and wait for the last | 446 | * like files and pipes do and wait for the last |
| 447 | * dereference. | 447 | * dereference. |
| @@ -481,7 +481,6 @@ static int unix_listen(struct socket *sock, int backlog) | |||
| 481 | struct sock *sk = sock->sk; | 481 | struct sock *sk = sock->sk; |
| 482 | struct unix_sock *u = unix_sk(sk); | 482 | struct unix_sock *u = unix_sk(sk); |
| 483 | struct pid *old_pid = NULL; | 483 | struct pid *old_pid = NULL; |
| 484 | const struct cred *old_cred = NULL; | ||
| 485 | 484 | ||
| 486 | err = -EOPNOTSUPP; | 485 | err = -EOPNOTSUPP; |
| 487 | if (sock->type != SOCK_STREAM && sock->type != SOCK_SEQPACKET) | 486 | if (sock->type != SOCK_STREAM && sock->type != SOCK_SEQPACKET) |
| @@ -503,8 +502,6 @@ static int unix_listen(struct socket *sock, int backlog) | |||
| 503 | out_unlock: | 502 | out_unlock: |
| 504 | unix_state_unlock(sk); | 503 | unix_state_unlock(sk); |
| 505 | put_pid(old_pid); | 504 | put_pid(old_pid); |
| 506 | if (old_cred) | ||
| 507 | put_cred(old_cred); | ||
| 508 | out: | 505 | out: |
| 509 | return err; | 506 | return err; |
| 510 | } | 507 | } |
