mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 9/9] UML - Free network IRQ correctly
@ 2006-01-04 21:52 Jeff Dike
  0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2006-01-04 21:52 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, user-mode-linux-devel

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>

Index: linux-2.6.15/arch/um/drivers/net_kern.c
===================================================================
--- linux-2.6.15.orig/arch/um/drivers/net_kern.c	2006-01-03 17:29:31.000000000 -0500
+++ linux-2.6.15/arch/um/drivers/net_kern.c	2006-01-04 14:57:58.000000000 -0500
@@ -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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-01-04 21:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-04 21:52 [PATCH 9/9] UML - Free network IRQ correctly Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®