lkml.org 
[lkml]   [2008]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[Patch 1/9] fs/exec.c: export free_arg_pages
Date
free_arg_pages() is used to clean the pages allocated by copy_strings_kenrel().
Since copy_strings_kernel() is exported, so should be free_arg_pages().

Signed-off-by: WANG Cong <wangcong@zeuux.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>

---
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index b512e48..a2bfa57 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -96,6 +96,7 @@ extern int setup_arg_pages(struct linux_binprm * bprm,
int executable_stack);
extern int bprm_mm_init(struct linux_binprm *bprm);
extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
+extern void free_arg_pages(struct linux_binprm *bprm);
extern void compute_creds(struct linux_binprm *binprm);
extern int do_coredump(long signr, int exit_code, struct pt_regs * regs);
extern int set_binfmt(struct linux_binfmt *new);
diff --git a/fs/exec.c b/fs/exec.c
index aeaa979..b49ba41 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -210,7 +210,7 @@ static void free_arg_page(struct linux_binprm *bprm, int i)
{
}

-static void free_arg_pages(struct linux_binprm *bprm)
+void free_arg_pages(struct linux_binprm *bprm)
{
}

@@ -301,7 +301,7 @@ static void free_arg_page(struct linux_binprm *bprm, int i)
}
}

-static void free_arg_pages(struct linux_binprm *bprm)
+void free_arg_pages(struct linux_binprm *bprm)
{
int i;

@@ -327,6 +327,8 @@ static bool valid_arg_len(struct linux_binprm *bprm, long len)

#endif /* CONFIG_MMU */

+EXPORT_SYMBOL(free_arg_pages);
+
/*
* Create a new mm_struct and populate it with a temporary stack
* vm_area_struct. We don't have enough context at this point to set the stack

\
 
 \ /
  Last update: 2008-05-08 15:57    [from the cache]
©2003-2011 Jasper Spaans