diff options
author | Liu Bo <[email protected]> | 2016-08-23 17:37:45 -0700 |
---|---|---|
committer | Chris Mason <[email protected]> | 2016-08-25 03:58:30 -0700 |
commit | 053ab70f0604224c7893b43f9d9d5efa283580d6 (patch) | |
tree | 7f2ac232c96eafbfbc71a85337ad935d9e599473 /tools/perf/scripts/python/bin/export-to-postgresql-report | |
parent | 35bbb97fc898aeb874cb7c8b746f091caa359994 (diff) |
Btrfs: check btree node's nritems
When btree node (level = 1) has nritems which equals to zero,
we can end up with panic due to insert_ptr()'s
BUG_ON(slot > nritems);
where slot is 1 and nritems is 0, as copy_for_split() calls
insert_ptr(.., path->slots[1] + 1, ...);
A invalid value results in the whole mess, this adds the check
for btree's node nritems so that we stop reading block when
when something is wrong.
Signed-off-by: Liu Bo <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions