From: Johan Hovold Date: Tue, 31 Jan 2017 16:17:29 +0000 (+0100) Subject: USB: serial: keyspan_pda: fix receive sanity checks X-Git-Tag: v3.2.89~68 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9d711c45a310cd150bddced2604a70115059c2b;p=pandora-kernel.git USB: serial: keyspan_pda: fix receive sanity checks commit c528fcb116e61afc379a2e0a0f70906b937f1e2c upstream. Make sure to check for short transfers before parsing the receive buffer to avoid acting on stale data. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold [bwh: Backported to 3.2: - Adjust context - Keep the check for !tty in the data case] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed