Commit f2513186 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[PATCH] 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.
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent dc2f204a
......@@ -728,7 +728,8 @@ static void close_devices(void)
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);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment