Re: [PATCH 5/7] staging: comedi: don't allow write() on async command set up for "read"

2014-10-30 Thread Ian Abbott
On 30/10/14 18:07, Hartley Sweeten wrote: On Thursday, October 30, 2014 5:43 AM, Ian Abbott wrote: [snip] add_wait_queue(&async->wait_head, &wait); on_wait_queue = true; @@ -2146,6 +2150,10 @@ static ssize_t comedi_write(struct file *file, const char __user *buf,

RE: [PATCH 5/7] staging: comedi: don't allow write() on async command set up for "read"

2014-10-30 Thread Hartley Sweeten
On Thursday, October 30, 2014 5:43 AM, Ian Abbott wrote: > If a Comedi asynchronous command has been set up for data transfer in > the "read" direction on the current "write" subdevice (for those > subdevices that support both directions), don't allow the "write" file > operation as that would mess

[PATCH 5/7] staging: comedi: don't allow write() on async command set up for "read"

2014-10-30 Thread Ian Abbott
If a Comedi asynchronous command has been set up for data transfer in the "read" direction on the current "write" subdevice (for those subdevices that support both directions), don't allow the "write" file operation as that would mess with the data in the comedi data buffer that is written by the l