diff options
Diffstat (limited to 'net/unix/af_unix.c')
| -rw-r--r-- | net/unix/af_unix.c | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index d1edfa3cad61..74d1eed7cbd4 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -225,6 +225,8 @@ static inline void unix_release_addr(struct unix_address *addr)  static int unix_mkname(struct sockaddr_un *sunaddr, int len, unsigned int *hashp)  { +	*hashp = 0; +  	if (len <= sizeof(short) || len > sizeof(*sunaddr))  		return -EINVAL;  	if (!sunaddr || sunaddr->sun_family != AF_UNIX) @@ -2640,7 +2642,7 @@ static __poll_t unix_poll(struct file *file, struct socket *sock, poll_table *wa  	struct sock *sk = sock->sk;  	__poll_t mask; -	sock_poll_wait(file, wait); +	sock_poll_wait(file, sock, wait);  	mask = 0;  	/* exceptional events? */ @@ -2677,7 +2679,7 @@ static __poll_t unix_dgram_poll(struct file *file, struct socket *sock,  	unsigned int writable;  	__poll_t mask; -	sock_poll_wait(file, wait); +	sock_poll_wait(file, sock, wait);  	mask = 0;  	/* exceptional events? */ |