Commit cab36da
Staging: comedi: Return -EFAULT if copy_to_user() fails
Return -EFAULT on error instead of the number of bytes remaining to be
copied.
Fixes: bac42fb ("comedi: get rid of compat_alloc_user_space() mess in COMEDI_CMD{,TEST} compat")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/X8c3pfwFy2jpy4BP@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 12b38ea commit cab36da
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2987 | 2987 | | |
2988 | 2988 | | |
2989 | 2989 | | |
2990 | | - | |
| 2990 | + | |
| 2991 | + | |
| 2992 | + | |
2991 | 2993 | | |
2992 | 2994 | | |
2993 | 2995 | | |
| |||
0 commit comments