forked from rubenslte/android_kernel_samsung_msm8226
Merge "unix: fix a race condition in unix_release()"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
789a7e2fde
+3
-4
@@ -374,7 +374,7 @@ static void unix_sock_destructor(struct sock *sk)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int unix_release_sock(struct sock *sk, int embrion)
|
||||
static void unix_release_sock(struct sock *sk, int embrion)
|
||||
{
|
||||
struct unix_sock *u = unix_sk(sk);
|
||||
struct path path;
|
||||
@@ -443,8 +443,6 @@ static int unix_release_sock(struct sock *sk, int embrion)
|
||||
|
||||
if (unix_tot_inflight)
|
||||
unix_gc(); /* Garbage collect fds */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void init_peercred(struct sock *sk)
|
||||
@@ -694,9 +692,10 @@ static int unix_release(struct socket *sock)
|
||||
if (!sk)
|
||||
return 0;
|
||||
|
||||
unix_release_sock(sk, 0);
|
||||
sock->sk = NULL;
|
||||
|
||||
return unix_release_sock(sk, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int unix_autobind(struct socket *sock)
|
||||
|
||||
Reference in New Issue
Block a user