Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service

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

 



On Tue, Jan 14, K. Y. Srinivasan wrote:


> +static ssize_t fcopy_write(struct file *file, const char __user *buf,
> +			size_t count, loff_t *ppos)
> +{
> +	int error = 0;
> +
> +	if (count != sizeof(int))
> +		return 0;
> +
> +	if (copy_from_user(&error, buf, sizeof(int)))
> +		return -EFAULT;
> +
> +	if (in_hand_shake) {
> +		fcopy_handle_handshake();
> +		return 0;
> +	}


> +	/*
> +	 * Register with the kernel.
> +	 */
> +	write(fcopy_fd, &version, sizeof(int));


Shouldnt there be some version check already even in this initial
implementation? What if there will be a newer daemon running on an older
kernel?

Olaf
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux