aboutsummaryrefslogtreecommitdiffstats
path: root/fs/quota_v1.c
diff options
context:
space:
mode:
authorAndrew Perepechko <andrew.perepechko@sun.com>2008-04-28 05:14:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:32 -0400
commit338bf9afda91ec005a1e9a0de4af0271cc167d56 (patch)
treee60edf0441efbe8215cdeb08bf05c1b6afff58a1 /fs/quota_v1.c
parent3b0cb4caefeca6fe6b05c6c5a76e9c633b44c58f (diff)
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_v1.c')
-rw-r--r--fs/quota_v1.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/quota_v1.c b/fs/quota_v1.c
index f3841f233069..a6cf9269105c 100644
--- a/fs/quota_v1.c
+++ b/fs/quota_v1.c
@@ -139,6 +139,9 @@ static int v1_read_file_info(struct super_block *sb, int type)
139 goto out; 139 goto out;
140 } 140 }
141 ret = 0; 141 ret = 0;
142 /* limits are stored as unsigned 32-bit data */
143 dqopt->info[type].dqi_maxblimit = 0xffffffff;
144 dqopt->info[type].dqi_maxilimit = 0xffffffff;
142 dqopt->info[type].dqi_igrace = dqblk.dqb_itime ? dqblk.dqb_itime : MAX_IQ_TIME; 145 dqopt->info[type].dqi_igrace = dqblk.dqb_itime ? dqblk.dqb_itime : MAX_IQ_TIME;
143 dqopt->info[type].dqi_bgrace = dqblk.dqb_btime ? dqblk.dqb_btime : MAX_DQ_TIME; 146 dqopt->info[type].dqi_bgrace = dqblk.dqb_btime ? dqblk.dqb_btime : MAX_DQ_TIME;
144out: 147out: