aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2009-05-29 11:09:08 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-05-29 11:09:08 -0400
commit0b6585ce05f169f10ce74329e87bd8c5070b4bb9 (patch)
tree0a46ceba501368499c9cb9e79b087e9a2235868a /drivers/mtd
parent668ff9ab45d595222d3f90d7974ccba3518e3bb3 (diff)
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')
-rw-r--r--drivers/mtd/mtdchar.c4
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,
839 struct inode *inode = file->f_path.dentry->d_inode; 839 struct inode *inode = file->f_path.dentry->d_inode;
840 struct mtd_file_info *mfi = file->private_data; 840 struct mtd_file_info *mfi = file->private_data;
841 struct mtd_info *mtd = mfi->mtd; 841 struct mtd_info *mtd = mfi->mtd;
842 void __user *argp = (void __user *)arg; 842 void __user *argp = compat_ptr(arg);
843 int ret = 0; 843 int ret = 0;
844 844
845 lock_kernel(); 845 lock_kernel();
@@ -874,7 +874,7 @@ static long mtd_compat_ioctl(struct file *file, unsigned int cmd,
874 break; 874 break;
875 } 875 }
876 default: 876 default:
877 ret = mtd_ioctl(inode, file, cmd, arg); 877 ret = mtd_ioctl(inode, file, cmd, (unsigned long)argp);
878 } 878 }
879 879
880 unlock_kernel(); 880 unlock_kernel();