Re: [PATCH 02/10] Drivers: hv: utils: run polling callback always in interrupt context

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

 



On Thu, Oct 08, Vitaly Kuznetsov wrote:

> > @@ -295,9 +288,6 @@ static int fcopy_on_msg(void *msg, int len)
> >  	if (fcopy_transaction.state == HVUTIL_DEVICE_INIT)
> >  		return fcopy_handle_handshake(*val);
> >
> > -	if (fcopy_transaction.state != HVUTIL_USERSPACE_REQ)
> > -		return -EINVAL;
> > -
> 
> This particular change seems unrelated and I'm unsure it's safe to
> remove this check. It is meant to protect against daemon screwing the
> protocol and writing to the device when it wasn't requested for an
> action. It is correct to propagate -EINVAL in this case. Or am I missing
> something and the check is redundant now?

What can happen if there is an odd write request? If there is a timeout
scheduled some return value will be sent to the host. Then the state is
set to RESET and eventually vmbus_recvpacket will receive something.
That something will be processed and passed to the daemon.

If there was no timeout scheduled the write will just return.

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