Re: [PATCH] staging: comedi: comedi_fops: do not call blocking ops when !TASK_RUNNING

2017-08-01 Thread Piotr Gregor
On Fri, Jul 28, 2017 at 04:22:31PM +0100, Ian Abbott wrote: > Comedi's read and write file operation handlers (`comedi_read()` and > `comedi_write()`) currently call `copy_to_user()` or `copy_from_user()` > whilst in the `TASK_INTERRUPTIBLE` state, which falls foul of the > `might_fault()` checks

Re: [PATCH] staging: comedi: comedi_fops: do not call blocking ops when !TASK_RUNNING

2017-08-01 Thread Piotr Gregor
On Fri, Jul 28, 2017 at 04:22:31PM +0100, Ian Abbott wrote: > Comedi's read and write file operation handlers (`comedi_read()` and > `comedi_write()`) currently call `copy_to_user()` or `copy_from_user()` > whilst in the `TASK_INTERRUPTIBLE` state, which falls foul of the > `might_fault()` checks

[PATCH] staging: comedi: comedi_fops: do not call blocking ops when !TASK_RUNNING

2017-07-28 Thread Ian Abbott
Comedi's read and write file operation handlers (`comedi_read()` and `comedi_write()`) currently call `copy_to_user()` or `copy_from_user()` whilst in the `TASK_INTERRUPTIBLE` state, which falls foul of the `might_fault()` checks when enabled. Fix it by setting the current task state back to

[PATCH] staging: comedi: comedi_fops: do not call blocking ops when !TASK_RUNNING

2017-07-28 Thread Ian Abbott
Comedi's read and write file operation handlers (`comedi_read()` and `comedi_write()`) currently call `copy_to_user()` or `copy_from_user()` whilst in the `TASK_INTERRUPTIBLE` state, which falls foul of the `might_fault()` checks when enabled. Fix it by setting the current task state back to