]> err.no Git - linux-2.6/commit
[PATCH] uml: close TUN/TAP file descriptors
authorJeff Dike <jdike@addtoit.com>
Tue, 7 Feb 2006 20:58:41 +0000 (12:58 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 8 Feb 2006 00:12:32 +0000 (16:12 -0800)
commit1d2ddcfb1935c9c0e98c4295458b01f24e3274f9
tree94bc4ad32840430b22e22057dbf8deb70e72492a
parentfbd5577901388ff9306a05eb63648c30e4722134
[PATCH] uml: close TUN/TAP file descriptors

When UML opens a TUN/TAP device, the file descriptor could be copied into
later, long-lived threads, holding the device open even after the interface is
taken down, preventing it from being brought up again.  This patch makes these
descriptors close-on-exec so that they disappear from helper processes, and
adds CLONE_FILES to a UML helper thread so that the descriptors are closed in
the thread when they are closed elsewhere in UML.

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>
arch/um/drivers/chan_user.c
arch/um/os-Linux/drivers/tuntap_user.c