diff options
author | Jeff Dike <jdike@addtoit.com> | 2006-01-06 03:19:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:48 -0500 |
commit | 8d93c700a489eba08514222df414a23852a85d2b (patch) | |
tree | 95431dbad08c7807840faff3d8bf85dba0c66e13 /arch/um | |
parent | 3a331a511a2fe522034f3958eecf58751be434ac (diff) |
[PATCH] uml: free network IRQ correctly
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 <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/drivers/net_kern.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index deb24828e6a5..fb1f9fb9b871 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -150,6 +150,7 @@ static int uml_net_close(struct net_device *dev) | |||
150 | if(lp->close != NULL) | 150 | if(lp->close != NULL) |
151 | (*lp->close)(lp->fd, &lp->user); | 151 | (*lp->close)(lp->fd, &lp->user); |
152 | lp->fd = -1; | 152 | lp->fd = -1; |
153 | list_del(&lp->list); | ||
153 | 154 | ||
154 | spin_unlock(&lp->lock); | 155 | spin_unlock(&lp->lock); |
155 | return 0; | 156 | return 0; |
@@ -715,6 +716,7 @@ static void close_devices(void) | |||
715 | 716 | ||
716 | list_for_each(ele, &opened){ | 717 | list_for_each(ele, &opened){ |
717 | lp = list_entry(ele, struct uml_net_private, list); | 718 | lp = list_entry(ele, struct uml_net_private, list); |
719 | free_irq(lp->dev->irq, lp->dev); | ||
718 | if((lp->close != NULL) && (lp->fd >= 0)) | 720 | if((lp->close != NULL) && (lp->fd >= 0)) |
719 | (*lp->close)(lp->fd, &lp->user); | 721 | (*lp->close)(lp->fd, &lp->user); |
720 | if(lp->remove != NULL) (*lp->remove)(&lp->user); | 722 | if(lp->remove != NULL) (*lp->remove)(&lp->user); |