HomeFreeBSD

psm(4): Fix panic occuring soon after PS/2 packet has been rejected by

Description

psm(4): Fix panic occuring soon after PS/2 packet has been rejected by
synaptics or elantech sanity checker.

After packet has been rejected contents of packet buffer is not cleared
with setting of inputbytes counter to 0. So when this packet buffer is
filled again being an element of circular queue, new data appends to old
data rather than overwrites it. This leads to packet buffer overflow
after 10 rounds.

Fix it with setting of packet's inputbytes counter to 0 after rejection.

While here add extra logging of rejected packets.

PR: 222667 (for reference)
Reported by: Neel Chauhan <neel@neelc.org>
Tested by: Neel Chauhan <neel@neelc.org>
MFC after: 1 week

Details

Provenance
wulfAuthored on Feb 4 2018, 11:01 PM
Parents
rG68a574863d27: Bump clang's __FreeBSD_cc_version, to cope with r328816, which removed
Branches
Unknown
Tags
Unknown

Event Timeline