[X][B][D][E][SRU][PATCH 1/1] xfs: Sanity check flags of Q_XQUOTARM call
Kleber Souza
kleber.souza at canonical.com
Fri Feb 28 08:58:15 UTC 2020
On 27.02.20 19:37, Sean Feole wrote:
> BUMP
>
> Was wondering if others would review and comment, as this should be
> added to X/B/D/E to fix a new test added to LTP.
Hi Sean,
This patch already has 2 ACK's, it will be applied soon when we start
processing the patches on the ML.
Kleber
>
> -sfeole
>
> On 2/21/20 2:19 AM, Po-Hsu Lin wrote:
>> From: Jan Kara <jack at suse.cz>
>>
>> BugLink: https://bugs.launchpad.net/bugs/1864092
>>
>> Flags passed to Q_XQUOTARM were not sanity checked for invalid values.
>> Fix that.
>>
>> Fixes: 9da93f9b7cdf ("xfs: fix Q_XQUOTARM ioctl")
>> Reported-by: Yang Xu <xuyang2018.jy at cn.fujitsu.com>
>> Signed-off-by: Jan Kara <jack at suse.cz>
>> Reviewed-by: Eric Sandeen <sandeen at redhat.com>
>> Reviewed-by: Darrick J. Wong <darrick.wong at oracle.com>
>> Signed-off-by: Darrick J. Wong <darrick.wong at oracle.com>
>> (cherry picked from commit 3dd4d40b420846dd35869ccc8f8627feef2cff32)
>> Signed-off-by: Po-Hsu Lin <po-hsu.lin at canonical.com>
>> ---
>> fs/xfs/xfs_quotaops.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/fs/xfs/xfs_quotaops.c b/fs/xfs/xfs_quotaops.c
>> index cd6c721..c7de17d 100644
>> --- a/fs/xfs/xfs_quotaops.c
>> +++ b/fs/xfs/xfs_quotaops.c
>> @@ -201,6 +201,9 @@ xfs_fs_rm_xquota(
>> if (XFS_IS_QUOTA_ON(mp))
>> return -EINVAL;
>>
>> + if (uflags & ~(FS_USER_QUOTA | FS_GROUP_QUOTA | FS_PROJ_QUOTA))
>> + return -EINVAL;
>> +
>> if (uflags & FS_USER_QUOTA)
>> flags |= XFS_DQ_USER;
>> if (uflags & FS_GROUP_QUOTA)
>
More information about the kernel-team
mailing list