]> git.pld-linux.org Git - packages/kernel.git/commitdiff
- fix file sharing/initrd issue (cox)
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 26 Oct 2003 16:21:41 +0000 (16:21 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    linux-2.4.22-file-sharing-initrd.patch -> 1.1

linux-2.4.22-file-sharing-initrd.patch [new file with mode: 0644]

diff --git a/linux-2.4.22-file-sharing-initrd.patch b/linux-2.4.22-file-sharing-initrd.patch
new file mode 100644 (file)
index 0000000..341650e
--- /dev/null
@@ -0,0 +1,39 @@
+Index: main.c
+===================================================================
+--- linux.org/init/main.c      (revision 3297)
++++ linux/init/main.c  (revision 3935)
+@@ -26,6 +26,7 @@
+ #include <linux/hdreg.h>
+ #include <linux/iobuf.h>
+ #include <linux/bootmem.h>
++#include <linux/file.h>
+ #include <linux/tty.h>
+ #include <asm/io.h>
+@@ -548,6 +549,7 @@
+ static int init(void * unused)
+ {
++      struct files_struct *files;
+       lock_kernel();
+       do_basic_setup();
+@@ -560,7 +562,17 @@
+        */
+       free_initmem();
+       unlock_kernel();
+-
++      
++      /*
++       * Right now we are a thread sharing with a ton of kernel
++       * stuff. We don't want to end up in user space in that state
++       */
++       
++      files = current->files;
++      if(unshare_files())
++              panic("unshare");
++      put_files_struct(files);
++      
+       if (open("/dev/console", O_RDWR, 0) < 0)
+               printk("Warning: unable to open an initial console.\n");
This page took 0.061887 seconds and 4 git commands to generate.