Skip to contentSkip to conversation

UML - Fix a shutdown hang caused by a failed ifconfig

PATCH In review Jeff Dike 1 participant 1 message Mar 7, 2005 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 7/16 UML - Fix a shutdown hang caused by a failed ifconfig

The network driver wasn't checking that the host side of an interface had been successfully opened before trying to close it at shuwtdown.

arch/um/drivers/net_kern.c +2 -1
Index: linux-2.6.11/arch/um/drivers/net_kern.c
===================================================================
@@ -728,7 +728,8 @@
 
 	list_for_each(ele, &opened){
 		lp = list_entry(ele, struct uml_net_private, list);
-		if(lp->close != NULL) (*lp->close)(lp->fd, &lp->user);
+		if((lp->close != NULL) && (lp->fd >= 0))
+			(*lp->close)(lp->fd, &lp->user);
 		if(lp->remove != NULL) (*lp->remove)(&lp->user);
 	}
 }

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel