kshmem modifications to actually use kshmem
PATCH 3/3 kshmem modifications to actually use kshmem
Signed-off-by Wink Saville <wink-hKg/[email protected]>
--- fs/exec.c | 10 ++++++++++ init/main.c | 3 +++ kernel/fork.c | 10 ++++++++++ 3 files changed, 23 insertions(+), 0 deletions(-)
fs/exec.c +10 -0
@@ -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);
init/main.c +3 -0
@@ -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 ();
kernel/fork.c +10 -0
@@ -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/