diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2021-02-23 14:30:43 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-10 09:23:29 +0100 |
commit | ac0bbf55ed3be75fde1f8907e91ecd2fd589bde3 (patch) | |
tree | 292fef63eaf52c483f1abcde385b4abc19ad26ba /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 25317f428a78fde71b2bf3f24d05850f08a73a52 (diff) |
staging: comedi: addi_apci_1500: Fix endian problem for command sample
The digital input subdevice supports Comedi asynchronous commands that
read interrupt status information. This uses 16-bit Comedi samples (of
which only the bottom 8 bits contain status information). However, the
interrupt handler is calling `comedi_buf_write_samples()` with the
address of a 32-bit variable `unsigned int status`. On a bigendian
machine, this will copy 2 bytes from the wrong end of the variable. Fix
it by changing the type of the variable to `unsigned short`.
Fixes: a8c66b684efa ("staging: comedi: addi_apci_1500: rewrite the subdevice support functions")
Cc: <stable@vger.kernel.org> #4.0+
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210223143055.257402-3-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions