Skip to content

Commit 4529e6d

Browse files
Christoph Hellwigdjwong
authored andcommitted
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: Arnd Bergmann <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Eric Sandeen <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 314e01a commit 4529e6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/xfs/xfs_ioctl32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ xfs_file_compat_ioctl(
547547
struct inode *inode = file_inode(filp);
548548
struct xfs_inode *ip = XFS_I(inode);
549549
struct xfs_mount *mp = ip->i_mount;
550-
void __user *arg = (void __user *)p;
550+
void __user *arg = compat_ptr(p);
551551
int error;
552552

553553
trace_xfs_file_compat_ioctl(ip);
@@ -655,6 +655,6 @@ xfs_file_compat_ioctl(
655655
return xfs_compat_fssetdm_by_handle(filp, arg);
656656
default:
657657
/* try the native version */
658-
return xfs_file_ioctl(filp, cmd, p);
658+
return xfs_file_ioctl(filp, cmd, (unsigned long)arg);
659659
}
660660
}

0 commit comments

Comments
 (0)