diff options
| author | Stephane Grosjean <s.grosjean@peak-system.com> | 2019-10-08 10:35:44 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-12 19:13:23 +0100 |
| commit | c41a025d641156a5694a7669af9efaf4fe7dea2a (patch) | |
| tree | b0262c0dd6747dcb6834168ac13c3e30a0c953f0 /include/linux/timerqueue.h | |
| parent | def6b03f667bce4b1465644a1d1b325336fddd63 (diff) | |
can: peak_usb: fix a potential out-of-sync while decoding packets
commit de280f403f2996679e2607384980703710576fed upstream.
When decoding a buffer received from PCAN-USB, the first timestamp read in
a packet is a 16-bit coded time base, and the next ones are an 8-bit
offset to this base, regardless of the type of packet read.
This patch corrects a potential loss of synchronization by using a
timestamp index read from the buffer, rather than an index of received
data packets, to determine on the sizeof the timestamp to be read from the
packet being decoded.
Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Fixes: 46be265d3388 ("can: usb: PEAK-System Technik PCAN-USB specific part")
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
