X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fautofs%2Froot.c;h=563706176bd43188036599a264a0819e0ef524fc;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=74ad37a84efc87f507e5f2b0e62602e30edb3ed6;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/fs/autofs/root.c b/fs/autofs/root.c index 74ad37a84..563706176 100644 --- a/fs/autofs/root.c +++ b/fs/autofs/root.c @@ -468,7 +468,7 @@ static int autofs_root_mkdir(struct inode *dir, struct dentry *dentry, int mode) /* Get/set timeout ioctl() operation */ static inline int autofs_get_set_timeout(struct autofs_sb_info *sbi, - unsigned long *p) + unsigned long __user *p) { unsigned long ntimeout; @@ -485,7 +485,7 @@ static inline int autofs_get_set_timeout(struct autofs_sb_info *sbi, } /* Return protocol version */ -static inline int autofs_get_protover(int *p) +static inline int autofs_get_protover(int __user *p) { return put_user(AUTOFS_PROTO_VERSION, p); } @@ -494,7 +494,7 @@ static inline int autofs_get_protover(int *p) static inline int autofs_expire_run(struct super_block *sb, struct autofs_sb_info *sbi, struct vfsmount *mnt, - struct autofs_packet_expire *pkt_p) + struct autofs_packet_expire __user *pkt_p) { struct autofs_dir_ent *ent; struct autofs_packet_expire pkt; @@ -526,6 +526,7 @@ static int autofs_root_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { struct autofs_sb_info *sbi = autofs_sbi(inode->i_sb); + void __user *argp = (void __user *)arg; DPRINTK(("autofs_ioctl: cmd = 0x%08x, arg = 0x%08lx, sbi = %p, pgrp = %u\n",cmd,arg,sbi,process_group(current))); @@ -545,12 +546,12 @@ static int autofs_root_ioctl(struct inode *inode, struct file *filp, autofs_catatonic_mode(sbi); return 0; case AUTOFS_IOC_PROTOVER: /* Get protocol version */ - return autofs_get_protover((int *)arg); + return autofs_get_protover(argp); case AUTOFS_IOC_SETTIMEOUT: - return autofs_get_set_timeout(sbi,(unsigned long *)arg); + return autofs_get_set_timeout(sbi, argp); case AUTOFS_IOC_EXPIRE: return autofs_expire_run(inode->i_sb, sbi, filp->f_vfsmnt, - (struct autofs_packet_expire *)arg); + argp); default: return -ENOSYS; }