linux/drivers/staging/comedi
Ian Abbott 42b8ce6f55 staging: comedi: comedi_compat32.c: fix COMEDI_CMD copy back
`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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28 11:19:34 -08:00
..
drivers staging: comedi: vmk80xx: include new "comedi_usb.h" header 2015-01-28 11:18:51 -08:00
kcomedilib Staging: comedi: kcomedilib: Fixed a typo 2015-01-17 14:33:24 -08:00
comedi_buf.c staging: comedi: comedidev.h: add 'scans_done' member to comedi_async 2014-11-05 14:59:46 -08:00
comedi_compat32.c staging: comedi: comedi_compat32.c: fix COMEDI_CMD copy back 2015-01-28 11:19:34 -08:00
comedi_compat32.h
comedi_fops.c staging: comedi: comedidev.h: add namespace to the subdevice "runflags" 2015-01-25 19:59:09 +08:00
comedi_internal.h
comedi_pci.c staging: comedi: split out PCI support into new module 2014-11-07 09:24:33 -08:00
comedi_pcmcia.c staging: comedi: split out PCMCIA support into new module 2014-11-07 09:24:33 -08:00
comedi_usb.c staging: comedi: comedi_usb.c: include new "comedi_usb.h" header 2015-01-28 11:18:50 -08:00
comedi_usb.h staging: comedi: comedi_usb.h: move USB stuff out of comedidev.h 2015-01-28 11:18:51 -08:00
comedi.h staging: comedi: add ioctls to set per-file read and write subdevice 2014-11-05 14:52:18 -08:00
comedidev.h staging: comedi: comedi_usb.h: move USB stuff out of comedidev.h 2015-01-28 11:18:51 -08:00
comedilib.h
drivers.c staging: comedi: comedidev.h: add namespace to the subdevice "runflags" 2015-01-25 19:59:09 +08:00
Kconfig staging: comedi: ni_labpc_isadma: use comedi_isdma module 2015-01-17 14:32:55 -08:00
Makefile staging: comedi: split out PCI support into new module 2014-11-07 09:24:33 -08:00
proc.c
range.c staging: comedi: Remove unecessary function and it's call 2014-10-20 10:29:13 +08:00
TODO