diff options
Diffstat (limited to 'net')
| -rw-r--r-- | net/unix/af_unix.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 0b0e58dd75fc..662ddb91f735 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -1231,11 +1231,15 @@ static struct sock *unix_find_bsd(struct sockaddr_un *sunaddr, int addr_len, goto path_put; err = -EPROTOTYPE; - if (sk->sk_type == type) - touch_atime(&path); - else + if (sk->sk_type != type) goto sock_put; + err = security_unix_find(&path, sk, flags); + if (err) + goto sock_put; + + touch_atime(&path); + path_put(&path); return sk; |
