mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
mtd: Fix pointer handling in compat ioctls to use compat_ptr()
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
668ff9ab45
commit
0b6585ce05
1 changed files with 2 additions and 2 deletions
|
@ -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 inode *inode = file->f_path.dentry->d_inode;
|
||||||
struct mtd_file_info *mfi = file->private_data;
|
struct mtd_file_info *mfi = file->private_data;
|
||||||
struct mtd_info *mtd = mfi->mtd;
|
struct mtd_info *mtd = mfi->mtd;
|
||||||
void __user *argp = (void __user *)arg;
|
void __user *argp = compat_ptr(arg);
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
lock_kernel();
|
lock_kernel();
|
||||||
|
@ -874,7 +874,7 @@ static long mtd_compat_ioctl(struct file *file, unsigned int cmd,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
ret = mtd_ioctl(inode, file, cmd, arg);
|
ret = mtd_ioctl(inode, file, cmd, (unsigned long)argp);
|
||||||
}
|
}
|
||||||
|
|
||||||
unlock_kernel();
|
unlock_kernel();
|
||||||
|
|
Loading…
Reference in a new issue