diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-05-29 17:09:08 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-05-29 17:09:08 +0200 |
commit | 0b6585ce05f169f10ce74329e87bd8c5070b4bb9 (patch) | |
tree | 0a46ceba501368499c9cb9e79b087e9a2235868a /drivers/mtd/mtdchar.c | |
parent | mtd: Handle compat ioctls directly; remove all trace from compat_ioctl.c (diff) | |
download | linux-0b6585ce05f169f10ce74329e87bd8c5070b4bb9.tar.xz linux-0b6585ce05f169f10ce74329e87bd8c5070b4bb9.zip |
mtd: Fix pointer handling in compat ioctls to use compat_ptr()
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/mtdchar.c')
-rw-r--r-- | drivers/mtd/mtdchar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 5fff04f3303d..5b081cb84351 100644 --- 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(); |