Re: [PATCH 02/12] VMCI: datagram implementation.

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

 



On Wed, Nov 07, 2012 at 10:41:26AM -0800, George Zhang wrote:
> +/*
> + * Create a datagram entry given a handle pointer.
> + */
> +static int dg_create_handle(u32 resource_id,
> +			    u32 flags,
> +			    u32 priv_flags,
> +			    vmci_datagram_recv_cb recv_cb,
> +			    void *client_data, struct vmci_handle *out_handle)
> +{
> +	int result;
> +	u32 context_id;
> +	struct vmci_handle handle;
> +	struct datagram_entry *entry;
> +
> +	BUG_ON(!recv_cb);
> +	BUG_ON(!out_handle);
> +	BUG_ON(priv_flags & ~VMCI_PRIVILEGE_ALL_FLAGS);

Given that this is a static function, there's no need for these
"asserts", right?  Please send a follow-on patch removing all BUG_ON()
calls from these files, it's not acceptable to crash a user's box from a
driver that is handling parameters _you_ are feeding it.

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