From: Jeff Dike Free the network IRQ when closing down the network devices at shutdown. Delete the device from the opened devices list on close. These prevent an -EBADF when later disabling SIGIO on all extant descriptors and a complaint from free_irq about freeing the IRQ twice. Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton --- arch/um/drivers/net_kern.c | 2 ++ 1 files changed, 2 insertions(+) diff -puN arch/um/drivers/net_kern.c~uml-free-network-irq-correctly arch/um/drivers/net_kern.c --- 25/arch/um/drivers/net_kern.c~uml-free-network-irq-correctly Wed Jan 4 15:26:01 2006 +++ 25-akpm/arch/um/drivers/net_kern.c Wed Jan 4 15:26:01 2006 @@ -150,6 +150,7 @@ static int uml_net_close(struct net_devi if(lp->close != NULL) (*lp->close)(lp->fd, &lp->user); lp->fd = -1; + list_del(&lp->list); spin_unlock(&lp->lock); return 0; @@ -715,6 +716,7 @@ static void close_devices(void) list_for_each(ele, &opened){ lp = list_entry(ele, struct uml_net_private, list); + free_irq(lp->dev->irq, lp->dev); if((lp->close != NULL) && (lp->fd >= 0)) (*lp->close)(lp->fd, &lp->user); if(lp->remove != NULL) (*lp->remove)(&lp->user); _