git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit was manufactured by cvs2svn to create tag
[linux-2.6.git]
/
fs
/
ioctl.c
diff --git
a/fs/ioctl.c
b/fs/ioctl.c
index
9737a0f
..
aef5391
100644
(file)
--- a/
fs/ioctl.c
+++ b/
fs/ioctl.c
@@
-18,6
+18,7
@@
static int file_ioctl(struct file *filp,unsigned int cmd,unsigned long arg)
int error;
int block;
struct inode * inode = filp->f_dentry->d_inode;
int error;
int block;
struct inode * inode = filp->f_dentry->d_inode;
+ int __user *p = (int __user *)arg;
switch (cmd) {
case FIBMAP:
switch (cmd) {
case FIBMAP:
@@
-29,18
+30,18
@@
static int file_ioctl(struct file *filp,unsigned int cmd,unsigned long arg)
return -EINVAL;
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
return -EINVAL;
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
- if ((error = get_user(block,
(int *) arg
)) != 0)
+ if ((error = get_user(block,
p
)) != 0)
return error;
res = mapping->a_ops->bmap(mapping, block);
return error;
res = mapping->a_ops->bmap(mapping, block);
- return put_user(res,
(int *) arg
);
+ return put_user(res,
p
);
}
case FIGETBSZ:
if (inode->i_sb == NULL)
return -EBADF;
}
case FIGETBSZ:
if (inode->i_sb == NULL)
return -EBADF;
- return put_user(inode->i_sb->s_blocksize,
(int *) arg
);
+ return put_user(inode->i_sb->s_blocksize,
p
);
case FIONREAD:
case FIONREAD:
- return put_user(i_size_read(inode) - filp->f_pos,
(int *) arg
);
+ return put_user(i_size_read(inode) - filp->f_pos,
p
);
}
if (filp->f_op && filp->f_op->ioctl)
return filp->f_op->ioctl(inode, filp, cmd, arg);
}
if (filp->f_op && filp->f_op->ioctl)
return filp->f_op->ioctl(inode, filp, cmd, arg);