Re: [PATCH] vhost-net: comment use of invalid fd when setting vhost backend

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

 



On Tue, Dec 22, 2009 at 10:18:28AM -0800, Chris Wright wrote:
> This looks like an error case, but it's just a special case to shutdown
> the backend.  Clarify with a comment.
> 
> Signed-off-by: Chris Wright <chrisw@xxxxxxxxxx>

Acked-by: Michael S. Tsirkin <mst@xxxxxxxxxx>

> ---
>  drivers/vhost/net.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
> index 22d5fef..cc92086 100644
> --- a/drivers/vhost/net.c
> +++ b/drivers/vhost/net.c
> @@ -465,6 +465,7 @@ static struct socket *get_tun_socket(int fd)
>  static struct socket *get_socket(int fd)
>  {
>  	struct socket *sock;
> +	/* special case to disable backend */
>  	if (fd == -1)
>  		return NULL;
>  	sock = get_raw_socket(fd);
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.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