]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
xfs: Align compat attrlist_by_handle with native implementation.
authorNick Bowler <nbowler@draconx.ca>
Mon, 17 Dec 2018 17:35:27 +0000 (09:35 -0800)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:21:31 +0000 (14:21 -0300)
commit8fd9afba0caa0dd2b270485d373d805cc0965745
tree0daa4e0799df9571baf3de8acd303ee6fb32fbe5
parent949ddf1dce29561cb5bcd4ede239605540fea1da
xfs: Align compat attrlist_by_handle with native implementation.

BugLink: https://bugs.launchpad.net/bugs/1855787
[ Upstream commit c456d64449efe37da50832b63d91652a85ea1d20 ]

While inspecting the ioctl implementations, I noticed that the compat
implementation of XFS_IOC_ATTRLIST_BY_HANDLE does not do exactly the
same thing as the native implementation.  Specifically, the "cursor"
does not appear to be written out to userspace on the compat path,
like it is on the native path.

This adjusts the compat implementation to copy out the cursor just
like the native implementation does.  The attrlist cursor does not
require any special compat handling.  This fixes xfstests xfs/269
on both IA-32 and x32 userspace, when running on an amd64 kernel.

Signed-off-by: Nick Bowler <nbowler@draconx.ca>
Fixes: 0facef7fb053b ("xfs: in _attrlist_by_handle, copy the cursor back to userspace")
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/xfs/xfs_ioctl32.c