提交 3004e537 编写于 作者: A Alan Cox 提交者: Greg Kroah-Hartman

USB: keyspan: Fix oops

If we get a data URB back from the hardware after we have put the tty to
bed we go kaboom. Fortunately all we need to do is process the URB
without trying to ram its contents down the throat of an ex-tty.

Cc: stable <stable@kernel.org>
Signed-off-by: NAlan Cox <alan@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 24e1c13c
...@@ -838,7 +838,7 @@ static void usa49_indat_callback(struct urb *urb) ...@@ -838,7 +838,7 @@ static void usa49_indat_callback(struct urb *urb)
port = (struct usb_serial_port *) urb->context; port = (struct usb_serial_port *) urb->context;
tty = port->tty; tty = port->tty;
if (urb->actual_length) { if (tty && urb->actual_length) {
/* 0x80 bit is error flag */ /* 0x80 bit is error flag */
if ((data[0] & 0x80) == 0) { if ((data[0] & 0x80) == 0) {
/* no error on any byte */ /* no error on any byte */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册