git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drm/i915: drop prealloc_start from i915_dma gtt init
[pandora-kernel.git]
/
fs
/
exec.c
diff --git
a/fs/exec.c
b/fs/exec.c
index
7761837
..
2d94552
100644
(file)
--- a/
fs/exec.c
+++ b/
fs/exec.c
@@
-361,13
+361,13
@@
err:
/*
* count() counts the number of strings in array ARGV.
*/
/*
* count() counts the number of strings in array ARGV.
*/
-static int count(c
har __user *
__user * argv, int max)
+static int count(c
onst char __user * const
__user * argv, int max)
{
int i = 0;
if (argv != NULL) {
for (;;) {
{
int i = 0;
if (argv != NULL) {
for (;;) {
- char __user * p;
+ c
onst c
har __user * p;
if (get_user(p, argv))
return -EFAULT;
if (get_user(p, argv))
return -EFAULT;
@@
-387,7
+387,7
@@
static int count(char __user * __user * argv, int max)
* processes's memory to the new process's stack. The call to get_user_pages()
* ensures the destination page is created and not swapped out.
*/
* processes's memory to the new process's stack. The call to get_user_pages()
* ensures the destination page is created and not swapped out.
*/
-static int copy_strings(int argc, c
har __user * __user *
argv,
+static int copy_strings(int argc, c
onst char __user *const __user *
argv,
struct linux_binprm *bprm)
{
struct page *kmapped_page = NULL;
struct linux_binprm *bprm)
{
struct page *kmapped_page = NULL;
@@
-396,7
+396,7
@@
static int copy_strings(int argc, char __user * __user * argv,
int ret;
while (argc-- > 0) {
int ret;
while (argc-- > 0) {
- char __user *str;
+ c
onst c
har __user *str;
int len;
unsigned long pos;
int len;
unsigned long pos;
@@
-470,12
+470,13
@@
out:
/*
* Like copy_strings, but get argv and its values from kernel memory.
*/
/*
* Like copy_strings, but get argv and its values from kernel memory.
*/
-int copy_strings_kernel(int argc,char ** argv, struct linux_binprm *bprm)
+int copy_strings_kernel(int argc, const char *const *argv,
+ struct linux_binprm *bprm)
{
int r;
mm_segment_t oldfs = get_fs();
set_fs(KERNEL_DS);
{
int r;
mm_segment_t oldfs = get_fs();
set_fs(KERNEL_DS);
- r = copy_strings(argc, (c
har __user *
__user *)argv, bprm);
+ r = copy_strings(argc, (c
onst char __user *const
__user *)argv, bprm);
set_fs(oldfs);
return r;
}
set_fs(oldfs);
return r;
}
@@
-997,7
+998,7
@@
EXPORT_SYMBOL(flush_old_exec);
void setup_new_exec(struct linux_binprm * bprm)
{
int i, ch;
void setup_new_exec(struct linux_binprm * bprm)
{
int i, ch;
- c
har *
name;
+ c
onst char *
name;
char tcomm[sizeof(current->comm)];
arch_pick_mmap_layout(current->mm);
char tcomm[sizeof(current->comm)];
arch_pick_mmap_layout(current->mm);
@@
-1117,7
+1118,7
@@
int check_unsafe_exec(struct linux_binprm *bprm)
bprm->unsafe = tracehook_unsafe_exec(p);
n_fs = 1;
bprm->unsafe = tracehook_unsafe_exec(p);
n_fs = 1;
-
write
_lock(&p->fs->lock);
+
spin
_lock(&p->fs->lock);
rcu_read_lock();
for (t = next_thread(p); t != p; t = next_thread(t)) {
if (t->fs == p->fs)
rcu_read_lock();
for (t = next_thread(p); t != p; t = next_thread(t)) {
if (t->fs == p->fs)
@@
-1134,7
+1135,7
@@
int check_unsafe_exec(struct linux_binprm *bprm)
res = 1;
}
}
res = 1;
}
}
-
write
_unlock(&p->fs->lock);
+
spin
_unlock(&p->fs->lock);
return res;
}
return res;
}
@@
-1316,9
+1317,9
@@
EXPORT_SYMBOL(search_binary_handler);
/*
* sys_execve() executes a new program.
*/
/*
* sys_execve() executes a new program.
*/
-int do_execve(char * filename,
- c
har __user *
__user *argv,
- c
har __user *
__user *envp,
+int do_execve(c
onst c
har * filename,
+ c
onst char __user *const
__user *argv,
+ c
onst char __user *const
__user *envp,
struct pt_regs * regs)
{
struct linux_binprm *bprm;
struct pt_regs * regs)
{
struct linux_binprm *bprm;