mirror of https://github.com/torvalds/linux.git
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 `TASK_RUNNING` a bit earlier before calling these functions. Reported-by: Piotr Gregor <piotrgregor@rsyncme.org> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Cc: <stable@vger.kernel.org> # 4.5+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
|---|---|---|
| .. | ||
| drivers | ||
| kcomedilib | ||
| Kconfig | ||
| Makefile | ||
| TODO | ||
| comedi.h | ||
| comedi_buf.c | ||
| comedi_compat32.c | ||
| comedi_compat32.h | ||
| comedi_fops.c | ||
| comedi_internal.h | ||
| comedi_pci.c | ||
| comedi_pci.h | ||
| comedi_pcmcia.c | ||
| comedi_pcmcia.h | ||
| comedi_usb.c | ||
| comedi_usb.h | ||
| comedidev.h | ||
| comedilib.h | ||
| drivers.c | ||
| proc.c | ||
| range.c | ||