Messages in this thread Patch in this message |  | | | Date | Thu, 8 Feb 2001 21:10:55 GMT | | From | Dag Brattli <> | | Subject | [patch] patch-2.4.1-irda1 (irtty) |
| |
Linus,
Here is a patch that fixes a kernel crash people have experiended when using IrDA dongles with Linux-2.4.
The problem was that the netdev was deallocated a bit to early at close time.
Please apply to your latest 2.4 code.
-- Dag
--- linux/drivers/net/irda/irtty.c.orig Sun Jan 21 23:35:44 2001 +++ linux/drivers/net/irda/irtty.c Sun Jan 21 23:36:30 2001 @@ -279,6 +279,11 @@ static void irtty_close(struct tty_struc tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); tty->disc_data = 0; + /* We are not using any dongle anymore! */ + if (self->dongle) + irda_device_dongle_cleanup(self->dongle); + self->dongle = NULL; + /* Remove netdevice */ if (self->netdev) { rtnl_lock(); @@ -286,11 +291,6 @@ static void irtty_close(struct tty_struc rtnl_unlock(); } - /* We are not using any dongle anymore! */ - if (self->dongle) - irda_device_dongle_cleanup(self->dongle); - self->dongle = NULL; - /* Remove speed changing task if any */ if (self->task) irda_task_delete(self->task); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |