diff options
author | Eric Sandeen <sandeen@redhat.com> | 2017-01-17 11:43:38 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-01-17 11:43:38 -0800 |
commit | 657bdfb7f5e68ca5e2ed009ab473c429b0d6af85 (patch) | |
tree | 29ed1abcffe747d94c6e26959eed1aaf320c5755 /fs/xfs/libxfs/xfs_dir2.c | |
parent | a324cbf10a3c67aaa10c9f47f7b5801562925bc2 (diff) | |
download | linux-657bdfb7f5e68ca5e2ed009ab473c429b0d6af85.tar.bz2 |
xfs: don't wrap ID in xfs_dq_get_next_id
The GETNEXTQOTA ioctl takes whatever ID is sent in,
and looks for the next active quota for an user
equal or higher to that ID.
But if we are at the maximum ID and then ask for the "next"
one, we may wrap back to zero. In this case, userspace
may loop forever, because it will start querying again
at zero.
We'll fix this in userspace as well, but for the kernel,
return -ENOENT if we ask for the next quota ID
past UINT_MAX so the caller knows to stop.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_dir2.c')
0 files changed, 0 insertions, 0 deletions