[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 8 Aug 2008 12:01:11 -0700
From: Greg KH <greg@...ah.com>
To: Jeff Garzik <jgarzik@...ox.com>
Cc: netdev@...r.kernel.org, linux-usb@...r.kernel.org,
Jari Tenhunen <jari.tenhunen@....fi>,
Olivier Blin <blino@...driva.com>,
Andrew Bird <ajb@...eresystems.co.uk>,
Paul Rolland <rol@...be.net>,
Arjan van de Ven <arjan@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [01/04] hso: fix oops in read/write callbacks
From: Olivier Blin <blino@...driva.com>
The tty may be closed already when the read/write callbacks are called.
This patch checks that the ttys still exist before waking them up.
Signed-off-by: Olivier Blin <blino@...driva.com>
Acked-by: Alan Cox <alan@...hat.com>
Cc: Jari Tenhunen <jari.tenhunen@....fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
drivers/net/usb/hso.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -1467,7 +1467,8 @@ static void hso_std_serial_write_bulk_ca
return;
}
hso_put_activity(serial->parent);
- tty_wakeup(serial->tty);
+ if (serial->tty)
+ tty_wakeup(serial->tty);
hso_kick_transmit(serial);
D1(" ");
@@ -1538,7 +1539,8 @@ static void ctrl_callback(struct urb *ur
clear_bit(HSO_SERIAL_FLAG_RX_SENT, &serial->flags);
} else {
hso_put_activity(serial->parent);
- tty_wakeup(serial->tty);
+ if (serial->tty)
+ tty_wakeup(serial->tty);
/* response to a write command */
hso_kick_transmit(serial);
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists