aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-09-30 20:00:34 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-09-30 20:00:34 -0400
commit8cc8c28a9acdceda0e60519167a052cc3408c5c3 (patch)
tree06c73a0904e4fa51d95cb51054312e72435e1a87
parent9c908f97d0f9aee32fa6d4b0a44c4c5d0ccab2b0 (diff)
[SPARC64]: Fix put_user() calls in binfmt_aout32.c
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>
-rw-r--r--arch/sparc64/kernel/binfmt_aout32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c
index f205fc7cbcd0..d208cc7804f2 100644
--- a/arch/sparc64/kernel/binfmt_aout32.c
+++ b/arch/sparc64/kernel/binfmt_aout32.c
@@ -177,7 +177,7 @@ static u32 __user *create_aout32_tables(char __user *p, struct linux_binprm *bpr
177 get_user(c,p++); 177 get_user(c,p++);
178 } while (c); 178 } while (c);
179 } 179 }
180 put_user(NULL,argv); 180 put_user(0,argv);
181 current->mm->arg_end = current->mm->env_start = (unsigned long) p; 181 current->mm->arg_end = current->mm->env_start = (unsigned long) p;
182 while (envc-->0) { 182 while (envc-->0) {
183 char c; 183 char c;
@@ -186,7 +186,7 @@ static u32 __user *create_aout32_tables(char __user *p, struct linux_binprm *bpr
186 get_user(c,p++); 186 get_user(c,p++);
187 } while (c); 187 } while (c);
188 } 188 }
189 put_user(NULL,envp); 189 put_user(0,envp);
190 current->mm->env_end = (unsigned long) p; 190 current->mm->env_end = (unsigned long) p;
191 return sp; 191 return sp;
192} 192}