Re: [PATCH 11/12] VMCI: host side driver implementation.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 07, 2012 at 10:42:53AM -0800, George Zhang wrote:
> +/*
> + * Sets up a given context for notify to work.  Calls drv_map_bool_ptr()
> + * which maps the notify boolean in user VA in kernel space.
> + */
> +static int vmci_host_setup_notify(struct vmci_ctx *context,
> +				  unsigned long uva)
> +{
> +	struct page *page;
> +	int retval;
> +
> +	if (context->notify_page) {
> +		pr_devel("%s: Notify mechanism is already set up.\n", __func__);
> +		return VMCI_ERROR_DUPLICATE_ENTRY;
> +	}
> +
> +	if (!access_ok(VERIFY_WRITE, (void __user *)uva, sizeof(bool)))
> +		return VMCI_ERROR_GENERIC;

This line causes sparse to complain.  The odds that userspace knows what
gcc is using for "bool" is pretty low.

Please fix.

thanks,

greg k-h
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux