]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: widen subdevice number argument in ioctl handlers
authorIan Abbott <abbotti@mev.co.uk>
Tue, 28 Oct 2014 17:15:47 +0000 (17:15 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 08:18:31 +0000 (16:18 +0800)
commitc70aeaad34536a217cca9e7573d49e9e7d4b3d80
treea5a03085e14c6fb4c1b02353dcbfc81488fb558a
parent7b04d7306d8c326ccaff2029aa87586a86d8a817
staging: comedi: widen subdevice number argument in ioctl handlers

For the `COMEDI_LOCK`, `COMEDI_UNLOCK`, `COMEDI_CANCEL`, and
`COMEDI_POLL` ioctls the third argument is a comedi subdevice number.
This is passed as an `unsigned long`, but when it is passed down to the
ioctl command-specific handler functions `do_lock_ioctl()`,
`do_unlock_ioctl()`, `do_cancel_ioctl()`, and `do_poll_ioctl()`, the
value has been narrowed to an `unsigned int`.  Pass through the argument
as an `unsigned long` to avoid truncating the value on 64-bit
architectures.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedi_fops.c