[PATCH] Kill a sparse warning in binfmt_elf.c

From: Arun Sharma
Date: Wed Oct 06 2004 - 18:11:24 EST



The attached patch kills a sparse warning in binfmt_elf.c:dump_write() by adding a __user annotation.

-Arun

Kill a sparse warning in 2.6.9-rc3.

Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>

===== fs/binfmt_elf.c 1.88 vs edited =====
--- 1.88/fs/binfmt_elf.c Wed Sep 22 13:34:05 2004
+++ edited/fs/binfmt_elf.c Wed Oct 6 13:16:37 2004
@@ -1032,7 +1032,7 @@
*/
static int dump_write(struct file *file, const void *addr, int nr)
{
- return file->f_op->write(file, addr, nr, &file->f_pos) == nr;
+ return file->f_op->write(file, (const char __user *) addr, nr, &file->f_pos) == nr;
}

static int dump_seek(struct file *file, off_t off)