diff options
author | Andrew Perepechko <andrew.perepechko@sun.com> | 2008-04-28 11:14:31 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 17:58:32 +0200 |
commit | 338bf9afda91ec005a1e9a0de4af0271cc167d56 (patch) | |
tree | e60edf0441efbe8215cdeb08bf05c1b6afff58a1 /fs/quota_v2.c | |
parent | kprobes: update document about batch registration (diff) | |
download | linux-338bf9afda91ec005a1e9a0de4af0271cc167d56.tar.xz linux-338bf9afda91ec005a1e9a0de4af0271cc167d56.zip |
quota: do not allow setting of quota limits to too high values
We should check whether quota limits set via Q_SETQUOTA are not exceeding
limits which quota format is able to handle.
Signed-off-by: Andrew Perepechko <andrew.perepechko@sun.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/quota_v2.c')
-rw-r--r-- | fs/quota_v2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/quota_v2.c b/fs/quota_v2.c index c519a583e681..23b647f25d08 100644 --- a/fs/quota_v2.c +++ b/fs/quota_v2.c @@ -59,6 +59,9 @@ static int v2_read_file_info(struct super_block *sb, int type) sb->s_id); return -1; } + /* limits are stored as unsigned 32-bit data */ + info->dqi_maxblimit = 0xffffffff; + info->dqi_maxilimit = 0xffffffff; info->dqi_bgrace = le32_to_cpu(dinfo.dqi_bgrace); info->dqi_igrace = le32_to_cpu(dinfo.dqi_igrace); info->dqi_flags = le32_to_cpu(dinfo.dqi_flags); |