diff options
| author | Ralf Baechle <ralf@linux-mips.org> | 2013-05-07 19:27:46 -0400 |
|---|---|---|
| committer | Ralf Baechle <ralf@linux-mips.org> | 2013-05-07 19:27:46 -0400 |
| commit | 9b3539e0e545e4c2f338acfc1ce52033a6f5e7f7 (patch) | |
| tree | 5c56e4a208dbe7e985e59911e1a421a7c1ee024c /net/unix/af_unix.c | |
| parent | 3d39019a1655d195a60a86ebf38f9da30bd83d03 (diff) | |
| parent | 1cd1c049271233deccfcc75123afa7f39a607f5a (diff) | |
Merge branch 'mips-next-3.10' of git://git.linux-mips.org/pub/scm/john/linux-john into mips-for-linux-next
Diffstat (limited to 'net/unix/af_unix.c')
| -rw-r--r-- | net/unix/af_unix.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 51be64f163ec..2db702d82e7d 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
| @@ -382,7 +382,7 @@ static void unix_sock_destructor(struct sock *sk) | |||
| 382 | #endif | 382 | #endif |
| 383 | } | 383 | } |
| 384 | 384 | ||
| 385 | static int unix_release_sock(struct sock *sk, int embrion) | 385 | static void unix_release_sock(struct sock *sk, int embrion) |
| 386 | { | 386 | { |
| 387 | struct unix_sock *u = unix_sk(sk); | 387 | struct unix_sock *u = unix_sk(sk); |
| 388 | struct path path; | 388 | struct path path; |
| @@ -451,8 +451,6 @@ static int unix_release_sock(struct sock *sk, int embrion) | |||
| 451 | 451 | ||
| 452 | if (unix_tot_inflight) | 452 | if (unix_tot_inflight) |
| 453 | unix_gc(); /* Garbage collect fds */ | 453 | unix_gc(); /* Garbage collect fds */ |
| 454 | |||
| 455 | return 0; | ||
| 456 | } | 454 | } |
| 457 | 455 | ||
| 458 | static void init_peercred(struct sock *sk) | 456 | static void init_peercred(struct sock *sk) |
| @@ -699,9 +697,10 @@ static int unix_release(struct socket *sock) | |||
| 699 | if (!sk) | 697 | if (!sk) |
| 700 | return 0; | 698 | return 0; |
| 701 | 699 | ||
| 700 | unix_release_sock(sk, 0); | ||
| 702 | sock->sk = NULL; | 701 | sock->sk = NULL; |
| 703 | 702 | ||
| 704 | return unix_release_sock(sk, 0); | 703 | return 0; |
| 705 | } | 704 | } |
| 706 | 705 | ||
| 707 | static int unix_autobind(struct socket *sock) | 706 | static int unix_autobind(struct socket *sock) |
| @@ -1994,7 +1993,7 @@ again: | |||
| 1994 | if ((UNIXCB(skb).pid != siocb->scm->pid) || | 1993 | if ((UNIXCB(skb).pid != siocb->scm->pid) || |
| 1995 | (UNIXCB(skb).cred != siocb->scm->cred)) | 1994 | (UNIXCB(skb).cred != siocb->scm->cred)) |
| 1996 | break; | 1995 | break; |
| 1997 | } else { | 1996 | } else if (test_bit(SOCK_PASSCRED, &sock->flags)) { |
| 1998 | /* Copy credentials */ | 1997 | /* Copy credentials */ |
| 1999 | scm_set_cred(siocb->scm, UNIXCB(skb).pid, UNIXCB(skb).cred); | 1998 | scm_set_cred(siocb->scm, UNIXCB(skb).pid, UNIXCB(skb).cred); |
| 2000 | check_creds = 1; | 1999 | check_creds = 1; |
