projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
668ff9a
)
mtd: Fix pointer handling in compat ioctls to use compat_ptr()
author
David Woodhouse
<David.Woodhouse@intel.com>
Fri, 29 May 2009 15:09:08 +0000
(16:09 +0100)
committer
David Woodhouse
<David.Woodhouse@intel.com>
Fri, 29 May 2009 15:09:08 +0000
(16:09 +0100)
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/mtdchar.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/mtdchar.c
b/drivers/mtd/mtdchar.c
index 5fff04f3303d4171a5aa29f18836ae36be07eb56..5b081cb84351340dd6164fe448703f93c6dfca47 100644
(file)
--- a/
drivers/mtd/mtdchar.c
+++ b/
drivers/mtd/mtdchar.c
@@
-839,7
+839,7
@@
static long mtd_compat_ioctl(struct file *file, unsigned int cmd,
struct inode *inode = file->f_path.dentry->d_inode;
struct mtd_file_info *mfi = file->private_data;
struct mtd_info *mtd = mfi->mtd;
- void __user *argp =
(void __user *)arg
;
+ void __user *argp =
compat_ptr(arg)
;
int ret = 0;
lock_kernel();
@@
-874,7
+874,7
@@
static long mtd_compat_ioctl(struct file *file, unsigned int cmd,
break;
}
default:
- ret = mtd_ioctl(inode, file, cmd,
arg
);
+ ret = mtd_ioctl(inode, file, cmd,
(unsigned long)argp
);
}
unlock_kernel();