Skip to content

Commit

Permalink
[SPARC64]: Fix put_user() calls in binfmt_aout32.c
Browse files Browse the repository at this point in the history
argv and envp are pointers to u32's in userspace, so don't
try to put_user() a NULL to them.

Aparently gcc-4.2.x now warns about this, and since we use
-Werror for arch/sparc64 code, this breaks the build.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Oct 1, 2007
1 parent 9c908f9 commit 8cc8c28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/sparc64/kernel/binfmt_aout32.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static u32 __user *create_aout32_tables(char __user *p, struct linux_binprm *bpr
get_user(c,p++);
} while (c);
}
put_user(NULL,argv);
put_user(0,argv);
current->mm->arg_end = current->mm->env_start = (unsigned long) p;
while (envc-->0) {
char c;
Expand All @@ -186,7 +186,7 @@ static u32 __user *create_aout32_tables(char __user *p, struct linux_binprm *bpr
get_user(c,p++);
} while (c);
}
put_user(NULL,envp);
put_user(0,envp);
current->mm->env_end = (unsigned long) p;
return sp;
}
Expand Down

0 comments on commit 8cc8c28

Please sign in to comment.