diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2013-02-27 10:56:19 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-04 06:09:07 +0800 |
commit | 6c80ee53f3737993f693bf2a3b4b3e4bbde9b51f (patch) | |
tree | 49e800bee8145e169ff2342cce132316fed3e0dc /lib/test-kstrtox.c | |
parent | 544da4403b05e874e134919db7124def003ef7cf (diff) |
staging: comedi: check s->async for poll(), read() and write()
commit cc400e185c07c15a42d2635995f422de5b94b696 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/test-kstrtox.c')
0 files changed, 0 insertions, 0 deletions