]> git.baikalelectronics.ru Git - kernel.git/commit
nilfs2: clamp ns_r_segments_percentage to [1, 99]
authorHaogang Chen <haogangchen@gmail.com>
Sat, 17 Mar 2012 00:08:38 +0000 (17:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 17 Mar 2012 00:14:44 +0000 (17:14 -0700)
commit30ca56c86ad43be4ffd7d5fbdd2f7c037df9c9e5
tree6cf49f30feef97f0cd0397e21769930c6d5ea52c
parentf1e37581aa6a9766521e3ac9ac36425c33d311c5
nilfs2: clamp ns_r_segments_percentage to [1, 99]

ns_r_segments_percentage is read from the disk.  Bogus or malicious
value could cause integer overflow and malfunction due to meaningless
disk usage calculation.  This patch reports error when mounting such
bogus volumes.

Signed-off-by: Haogang Chen <haogangchen@gmail.com>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/nilfs2/the_nilfs.c