lkml.org 
[lkml]   [2005]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 7/16] UML - Fix a shutdown hang caused by a failed ifconfig
Date
From
The network driver wasn't checking that the host side of an interface had
been successfully opened before trying to close it at shuwtdown.

Signed-off-by: Jeff Dike <jdike@addtoit.com>

Index: linux-2.6.11/arch/um/drivers/net_kern.c
===================================================================
--- linux-2.6.11.orig/arch/um/drivers/net_kern.c 2005-03-05 12:07:28.000000000 -0500
+++ linux-2.6.11/arch/um/drivers/net_kern.c 2005-03-05 12:12:13.000000000 -0500
@@ -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);
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.025 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site