diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2013-02-05 12:50:40 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-05 19:23:32 (GMT) |
commit | cc400e185c07c15a42d2635995f422de5b94b696 (patch) | |
tree | 101b8c0466ace7355e678331e2041afdded61908 /drivers/iio/adc/max1363.c | |
parent | 4a79f730179061c54d5c4ce1b59c1babbb05912f (diff) | |
download | linux-fsl-qoriq-cc400e185c07c15a42d2635995f422de5b94b696.tar.xz |
staging: comedi: check s->async for poll(), read() and write()
Some low-level comedi drivers (incorrectly) point `dev->read_subdev` or
`dev->write_subdev` to a subdevice that does not support asynchronous
commands. Comedi's poll(), read() and write() file operation handlers
assume these subdevices do support asynchronous commands. In
particular, they assume `s->async` is valid (where `s` points to the
read or write subdevice), which it won't be if it has been set
incorrectly. This can lead to a NULL pointer dereference.
Check `s->async` is non-NULL in `comedi_poll()`, `comedi_read()` and
`comedi_write()` to avoid the bug.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/adc/max1363.c')
0 files changed, 0 insertions, 0 deletions