[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <12102547782640-git-send-email-xiyou.wangcong@gmail.com>
Date: Thu, 8 May 2008 21:52:26 +0800
From: WANG Cong <xiyou.wangcong@...il.com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Andrew Morton <akpm@...l.org>,
WANG Cong <xiyou.wangcong@...il.com>,
WANG Cong <wangcong@...ux.org>,
Alexander Viro <viro@...iv.linux.org.uk>
Subject: [Patch 1/9] fs/exec.c: export free_arg_pages
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@...ux.org>
Cc: Alexander Viro <viro@...iv.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
--
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