summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2015-01-27 21:16:51 +0300
committerZefan Li <lizefan@huawei.com>2015-06-19 06:40:12 +0300
commitd2848d647b5ac1be9dfd46c634bcd667ea76ed7e (patch)
tree0234b25b70179fd4a88bde5297060875e1fc1355 /arch/arm
parent71ff678d407c318017a92e24da14e01a989814c0 (diff)
downloadlinux-d2848d647b5ac1be9dfd46c634bcd667ea76ed7e.tar.xz
staging: comedi: comedi_compat32.c: fix COMEDI_CMD copy back
commit 42b8ce6f55facfa101462e694d33fc6bca471138 upstream. `do_cmd_ioctl()` in "comedi_fops.c" handles the `COMEDI_CMD` ioctl. This returns `-EAGAIN` if it has copied a modified `struct comedi_cmd` back to user-space. (This occurs when the low-level Comedi driver's `do_cmdtest()` handler returns non-zero to indicate a problem with the contents of the `struct comedi_cmd`, or when the `struct comedi_cmd` has the `CMDF_BOGUS` flag set.) `compat_cmd()` in "comedi_compat32.c" handles the 32-bit compatible version of the `COMEDI_CMD` ioctl. Currently, it never copies a 32-bit compatible version of `struct comedi_cmd` back to user-space, which is at odds with the way the regular `COMEDI_CMD` ioctl is handled. To fix it, change `compat_cmd()` to copy a 32-bit compatible version of the `struct comedi_cmd` back to user-space when the main ioctl handler returns `-EAGAIN`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Zefan Li <lizefan@huawei.com>
Diffstat (limited to 'arch/arm')
0 files changed, 0 insertions, 0 deletions