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

2014-10-30 Thread Ian Abbott
On 30/10/14 20:45, Hartley Sweeten wrote: On Thursday, October 30, 2014 1:28 PM, Ian Abbott wrote: On 30/10/14 18:05, Hartley Sweeten wrote: On Thursday, October 30, 2014 5:42 AM, Ian Abbott wrote: [snip] add_wait_queue(&async->wait_head, &wait); while (nbytes > 0 && !retval

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

2014-10-30 Thread Hartley Sweeten
On Thursday, October 30, 2014 1:28 PM, Ian Abbott wrote: > On 30/10/14 18:05, Hartley Sweeten wrote: >> On Thursday, October 30, 2014 5:42 AM, Ian Abbott wrote: > [snip] >>> add_wait_queue(&async->wait_head, &wait); >>> while (nbytes > 0 && !retval) { >>> @@ -2249,6 +2253,10 @@ static ssiz

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

2014-10-30 Thread Ian Abbott
On 30/10/14 18:05, Hartley Sweeten wrote: On Thursday, October 30, 2014 5:42 AM, Ian Abbott wrote: [snip] add_wait_queue(&async->wait_head, &wait); while (nbytes > 0 && !retval) { @@ -2249,6 +2253,10 @@ static ssize_t comedi_read(struct file *file, char __user *buf, size_t nbyt

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

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