Signed-off-by: Wink Saville <[EMAIL PROTECTED]>
---
fs/exec.c | 10 ++++++++++
init/main.c | 3 +++
kernel/fork.c | 10 ++++++++++
3 files changed, 23 insertions(+), 0 deletions(-)
Index: linux-2.6/fs/exec.c
===================================================================
--- linux-2.6.orig/fs/exec.c 2007-04-29 21:51:39.000000000 -0700
+++ linux-2.6/fs/exec.c 2007-04-29 21:52:04.000000000 -0700
@@ -58,6 +58,10 @@
#include <linux/kmod.h>
#endif
+#ifdef CONFIG_KSHMEM
+#include <linux/kshmem.h>
+#endif
+
int core_uses_pid;
char core_pattern[128] = "core";
int suid_dumpable = 0;
@@ -1183,6 +1187,12 @@
if (retval < 0)
goto out;
+#ifdef CONFIG_KSHMEM
+ retval = kshmem_prepare(bprm->mm);
+ if (retval < 0)
+ goto out;
+#endif
+
retval = search_binary_handler(bprm,regs);
if (retval >= 0) {
free_arg_pages(bprm);
Index: linux-2.6/init/main.c
===================================================================
--- linux-2.6.orig/init/main.c 2007-04-29 21:51:39.000000000 -0700
+++ linux-2.6/init/main.c 2007-04-29 21:56:20.000000000 -0700
@@ -54,6 +54,7 @@
#include <linux/lockdep.h>
#include <linux/pid_namespace.h>
#include <linux/device.h>
+#include <linux/kshmem.h>
#include <asm/io.h>
#include <asm/bugs.h>
@@ -615,6 +616,8 @@
if (efi_enabled)
efi_enter_virtual_mode();
#endif
+
+ kshmem_init();
fork_init(num_physpages);
proc_caches_init();
buffer_init();
Index: linux-2.6/kernel/fork.c
===================================================================
--- linux-2.6.orig/kernel/fork.c 2007-04-29 21:51:39.000000000 -0700
+++ linux-2.6/kernel/fork.c 2007-04-29 21:52:04.000000000 -0700
@@ -57,6 +57,10 @@
#include <asm/cacheflush.h>
#include <asm/tlbflush.h>
+#ifdef CONFIG_KSHMEM
+#include <linux/kshmem.h>
+#endif
+
/*
* Protected counters by write_lock_irq(&tasklist_lock)
*/
@@ -221,6 +225,12 @@
rb_parent = NULL;
pprev = &mm->mmap;
+#ifdef CONFIG_KSHMEM
+ retval = kshmem_prepare(mm);
+ if (retval < 0)
+ goto out;
+#endif
+
for (mpnt = oldmm->mmap; mpnt; mpnt = mpnt->vm_next) {
struct file *file;
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel