kernel-ark/drivers/staging/comedi
Ian Abbott cc400e185c 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>
2013-02-05 11:23:32 -08:00
..
drivers staging: comedi: remove 'comedi_autoconfig' module parameter 2013-02-05 11:22:08 -08:00
kcomedilib staging: comedi: use comedi_dev_from_minor() 2013-01-07 14:25:46 -08:00
comedi_buf.c staging: comedi: comedi_buf: remove noise in comedi_buf_read_free() 2013-01-17 16:56:01 -08:00
comedi_compat32.c staging: comedi: Makefile: conditionally compile multi-file core module 2013-01-07 14:51:11 -08:00
comedi_compat32.h
comedi_fops.c staging: comedi: check s->async for poll(), read() and write() 2013-02-05 11:23:32 -08:00
comedi_internal.h staging: comedi: remove 'comedi_autoconfig' module parameter 2013-02-05 11:22:08 -08:00
comedi_pci.c staging: comedi: conditionally build in PCI driver support 2013-01-31 10:38:10 +01:00
comedi_pcmcia.c staging: comedi: comedi_pcmcia: introduce comedi_pcmcia_{enable, disable} 2013-02-04 14:47:18 -08:00
comedi_usb.c staging: comedi: conditionally build in USB driver support 2013-01-31 10:35:48 +01:00
comedi.h staging: comedi: deprecate loading firmware with comedi_config 2013-01-17 16:51:46 -08:00
comedidev.h staging: comedi: comedi_pcmcia: introduce comedi_pcmcia_{enable, disable} 2013-02-04 14:47:18 -08:00
comedilib.h
drivers.c staging: comedi: remove 'comedi_autoconfig' module parameter 2013-02-05 11:22:08 -08:00
Kconfig staging: comedi: das08: split out bus specific code 2013-02-03 17:33:08 -08:00
Makefile staging: comedi: conditionally build in PCMCIA driver support 2013-01-31 10:38:10 +01:00
proc.c staging: comedi: Makefile: conditionally compile multi-file core module 2013-01-07 14:51:11 -08:00
range.c
TODO