Files
i2som-imx-linux/include/linux
Ryusuke Konishi 74e08b1cc7 nilfs2: fix sanity check of btree level in nilfs_btree_root_broken()
commit d8fd150fe3 upstream.

The range check for b-tree level parameter in nilfs_btree_root_broken()
is wrong; it accepts the case of "level == NILFS_BTREE_LEVEL_MAX" even
though the level is limited to values in the range of 0 to
(NILFS_BTREE_LEVEL_MAX - 1).

Since the level parameter is read from storage device and used to index
nilfs_btree_path array whose element count is NILFS_BTREE_LEVEL_MAX, it
can cause memory overrun during btree operations if the boundary value
is set to the level parameter on device.

This fixes the broken sanity check and adds a comment to clarify that
the upper bound NILFS_BTREE_LEVEL_MAX is exclusive.

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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2015-08-07 00:32:09 +01:00
..
2014-01-03 04:33:18 +00:00
2012-11-16 16:46:48 +00:00
2013-09-10 01:57:27 +01:00
2014-12-14 16:23:48 +00:00
2015-05-09 23:16:12 +01:00
2013-01-03 03:32:57 +00:00
2013-03-06 03:23:57 +00:00
2013-08-02 22:14:47 +02:00
2015-05-09 23:16:12 +01:00
2013-03-06 03:24:27 +00:00
2013-04-25 20:25:38 +01:00
2012-10-10 03:30:45 +01:00
2015-02-20 00:49:40 +00:00
2013-07-27 05:34:29 +01:00
2013-04-25 20:25:40 +01:00
2014-02-15 19:20:16 +00:00
2014-04-02 00:58:44 +01:00
2014-07-11 13:33:35 +01:00
2014-08-06 18:07:42 +01:00
2013-01-16 01:13:25 +00:00
2015-02-20 00:49:37 +00:00