[PATCH] Fix sparse warnings in compat aout code
authorAndi Kleen <ak@suse.de>
Tue, 26 Sep 2006 08:52:33 +0000 (10:52 +0200)
committerAndi Kleen <andi@basil.nowhere.org>
Tue, 26 Sep 2006 08:52:33 +0000 (10:52 +0200)
Signed-off-by: Andi Kleen <ak@suse.de>
arch/x86_64/ia32/ia32_aout.c

index 3bf58af98936fda96afff0f79b873ea4c61750ed..396d3c10001173745cb08cfe0569101319987fdb 100644 (file)
@@ -333,7 +333,8 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
                        return error;
                }
 
-               error = bprm->file->f_op->read(bprm->file, (char *)text_addr,
+               error = bprm->file->f_op->read(bprm->file,
+                        (char __user *)text_addr,
                          ex.a_text+ex.a_data, &pos);
                if ((signed long)error < 0) {
                        send_sig(SIGKILL, current, 0);
@@ -366,7 +367,8 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
                        down_write(&current->mm->mmap_sem);
                        do_brk(N_TXTADDR(ex), ex.a_text+ex.a_data);
                        up_write(&current->mm->mmap_sem);
-                       bprm->file->f_op->read(bprm->file,(char *)N_TXTADDR(ex),
+                       bprm->file->f_op->read(bprm->file,
+                                       (char __user *)N_TXTADDR(ex),
                                        ex.a_text+ex.a_data, &pos);
                        flush_icache_range((unsigned long) N_TXTADDR(ex),
                                           (unsigned long) N_TXTADDR(ex) +
@@ -477,7 +479,7 @@ static int load_aout_library(struct file *file)
                do_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss);
                up_write(&current->mm->mmap_sem);
                
-               file->f_op->read(file, (char *)start_addr,
+               file->f_op->read(file, (char __user *)start_addr,
                        ex.a_text + ex.a_data, &pos);
                flush_icache_range((unsigned long) start_addr,
                                   (unsigned long) start_addr + ex.a_text + ex.a_data);