mirror of
https://github.com/torvalds/linux.git
synced 2026-11-26 16:33:17 +00:00
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 <[email protected]> Signed-off-by: Ian Abbott <[email protected]> Cc: <[email protected]> # 4.5+ Signed-off-by: Greg Kroah-Hartman <[email protected]>