Commit 4529e6d7 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong

xfs: compat_ioctl: use compat_ptr()

For 31-bit s390 user space, we have to pass pointer arguments through
compat_ptr() in the compat_ioctl handler.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarEric Sandeen <sandeen@redhat.com>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent 314e01a6
......@@ -547,7 +547,7 @@ xfs_file_compat_ioctl(
struct inode *inode = file_inode(filp);
struct xfs_inode *ip = XFS_I(inode);
struct xfs_mount *mp = ip->i_mount;
void __user *arg = (void __user *)p;
void __user *arg = compat_ptr(p);
int error;
trace_xfs_file_compat_ioctl(ip);
......@@ -655,6 +655,6 @@ xfs_file_compat_ioctl(
return xfs_compat_fssetdm_by_handle(filp, arg);
default:
/* try the native version */
return xfs_file_ioctl(filp, cmd, p);
return xfs_file_ioctl(filp, cmd, (unsigned long)arg);
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment