[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130124211136.234762767@linuxfoundation.org>
Date: Thu, 24 Jan 2013 13:12:39 -0800
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
alan@...rguk.ukuu.org.uk, Al Viro <viro@...iv.linux.org.uk>,
Barry Davis <Barry-Davis@...rmagic.com>
Subject: [ 01/46] make sure that /linuxrc has std{in,out,err}
3.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Al Viro <viro@...iv.linux.org.uk>
commit 43b16820249396aea7eb57c747106e211e54bed5 upstream.
Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
Cc: Barry Davis <Barry-Davis@...rmagic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
init/do_mounts_initrd.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -36,6 +36,10 @@ __setup("noinitrd", no_initrd);
static int init_linuxrc(struct subprocess_info *info, struct cred *new)
{
sys_unshare(CLONE_FS | CLONE_FILES);
+ /* stdin/stdout/stderr for /linuxrc */
+ sys_open("/dev/console", O_RDWR, 0);
+ sys_dup(0);
+ sys_dup(0);
/* move initrd over / and chdir/chroot in initrd root */
sys_chdir("/root");
sys_mount(".", "/", NULL, MS_MOVE, NULL);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists