提交 548dd4b6 编写于 作者: J Johan Hovold 提交者: Greg Kroah-Hartman

USB: serial: fix console error reporting

Do not report errors in write path if port is used as a console as this
may trigger the same error (and error report) resulting in a loop.
Reported-by: NStephen Hemminger <shemminger@vyatta.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: NJohan Hovold <jhovold@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 e688355b
......@@ -217,8 +217,10 @@ static int usb_serial_generic_write_start(struct usb_serial_port *port)
clear_bit(i, &port->write_urbs_free);
result = usb_submit_urb(urb, GFP_ATOMIC);
if (result) {
dev_err(&port->dev, "%s - error submitting urb: %d\n",
if (!port->port.console) {
dev_err(&port->dev, "%s - error submitting urb: %d\n",
__func__, result);
}
set_bit(i, &port->write_urbs_free);
spin_lock_irqsave(&port->lock, flags);
port->tx_bytes -= count;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册