Have a couple of extra warnings:
fs/binfmt_elf.c: In function `create_elf_tables':
fs/binfmt_elf.c:239: warning: initialization makes integer from pointer without a cast
fs/binfmt_elf.c:249: warning: initialization makes integer from pointer without a cast
#ifndef elf_addr_t
#define elf_addr_t unsigned long
#endif
elf_addr_t *argv, *envp;
__put_user(NULL, argv);
__put_user(NULL, envp);
It would therefore appear that x86 __put_user is not properly type-checking
the arguments to __put_user().
Here's a patch which fixes the warning (but doesn't fix x86's type-check
challenged __put_user implementation):
--- orig/fs/binfmt_elf.c Thu Nov 28 16:45:26 2002
+++ linux/fs/binfmt_elf.c Fri Jan 17 17:08:50 2003
@@ -236,7 +236,7 @@
return;
p += len;
}
- __put_user(NULL, argv);
+ __put_user(0, argv);
current->mm->arg_end = current->mm->env_start = p;
while (envc-- > 0) {
size_t len;
@@ -246,7 +246,7 @@
return;
p += len;
}
- __put_user(NULL, envp);
+ __put_user(0, envp);
current->mm->env_end = p;
/* Put the elf_info on the stack in the right place. */
-- Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/