err = verify_compat_iovec(&kern_msg, iov, addr, VERIFY_WRITE); 
err = verify_compat_iovec(&msg_sys, iov, addr, VERIFY_WRITE); 
asmlinkage int solaris_recvmsg(int fd, struct sol_nmsghdr __user *user_msg, unsigned int user_flags){	struct iovec iovstack[UIO_FASTIOV];	struct msghdr kern_msg;	char addr[MAX_SOCK_ADDR];	struct socket *sock;	struct iovec *iov = iovstack;	struct sockaddr __user *uaddr;	int __user *uaddr_len;	unsigned long cmsg_ptr;	int err, total_len, len = 0;	if(msghdr_from_user32_to_kern(&kern_msg, user_msg))		return -EFAULT;	if(kern_msg.msg_iovlen > UIO_MAXIOV)		return -EINVAL;	uaddr = kern_msg.msg_name;	uaddr_len = &user_msg->msg_namelen;	err = verify_compat_iovec(&kern_msg, iov, addr, VERIFY_WRITE);	if (err < 0)		goto out;	total_len = err;	cmsg_ptr = (unsigned long) kern_msg.msg_control;	kern_msg.msg_flags = 0;	lock_kernel();	sock = sockfd_lookup(fd, &err);	if (sock != NULL) {		if (sock->file->f_flags & O_NONBLOCK)			user_flags |= MSG_DONTWAIT;		err = sock_recvmsg(sock, &kern_msg, total_len, user_flags);		if(err >= 0)			len = err;		sockfd_put(sock);	}	unlock_kernel();	if(uaddr != NULL && err >= 0)		err = move_addr_to_user(addr, kern_msg.msg_namelen, uaddr, uaddr_len);	if(err >= 0) {		err = __put_user(linux_to_solaris_msgflags(kern_msg.msg_flags), &user_msg->msg_flags);		if(!err) {			/* XXX Convert cmsg back into userspace 32-bit format... */			err = __put_user((unsigned long)kern_msg.msg_control - cmsg_ptr,					 &user_msg->msg_controllen);		}	}	if(kern_msg.msg_iov != iov)		kfree(kern_msg.msg_iov);out:	if(err < 0)		return err;	return len;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d64d3873721cfe870d49d73c3744f06260779ce7/socket.c/buggy/arch/sparc64/solaris/socket.c