diff options
| author | Ian Abbott <abbotti@mev.co.uk> | 2019-06-26 16:17:39 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-01 09:50:15 +0300 |
| commit | 7379e6baeddf580d01feca650ec1ad508b6ea8ee (patch) | |
| tree | ff45d9afbeda00c1f6e6393bde6631e0e846f7d3 /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | 338d9637361c87730be5960585cc481cd144cf20 (diff) | |
| download | linux-7379e6baeddf580d01feca650ec1ad508b6ea8ee.tar.xz | |
staging: comedi: amplc_pci230: fix null pointer deref on interrupt
The interrupt handler `pci230_interrupt()` causes a null pointer
dereference for a PCI260 card. There is no analog output subdevice for
a PCI260. The `dev->write_subdev` subdevice pointer and therefore the
`s_ao` subdevice pointer variable will be `NULL` for a PCI260. The
following call near the end of the interrupt handler results in the null
pointer dereference for a PCI260:
comedi_handle_events(dev, s_ao);
Fix it by only calling the above function if `s_ao` is valid.
Note that the other uses of `s_ao` in the calls
`pci230_handle_ao_nofifo(dev, s_ao);` and `pci230_handle_ao_fifo(dev,
s_ao);` will never be reached for a PCI260, so they are safe.
Fixes: 39064f23284c ("staging: comedi: amplc_pci230: use comedi_handle_events()")
Cc: <stable@vger.kernel.org> # v3.19+
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions
