summaryrefslogtreecommitdiffstats
path: root/block/partitions
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-08-05 10:09:59 +0200
committerJens Axboe <axboe@fb.com>2014-08-05 21:13:24 +0200
commitd97a86c170b4e432f76db072a827fe30b4d6f659 (patch)
tree7a494e353fb71dcfbe396bc827f53f82f7acd268 /block/partitions
parentblkcg: don't call into policy draining if root_blkg is already gone (diff)
downloadlinux-d97a86c170b4e432f76db072a827fe30b4d6f659.tar.xz
linux-d97a86c170b4e432f76db072a827fe30b4d6f659.zip
partitions: aix.c: off by one bug
The lvip[] array has "state->limit" elements so the condition here should be >= instead of >. Fixes: 6ceea22bbbc8 ('partitions: add aix lvm partition support files') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/partitions')
-rw-r--r--block/partitions/aix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/partitions/aix.c b/block/partitions/aix.c
index 0a6ed546331d..f3ed7b2d89bf 100644
--- a/block/partitions/aix.c
+++ b/block/partitions/aix.c
@@ -253,7 +253,7 @@ int aix_partition(struct parsed_partitions *state)
continue;
}
lv_ix = be16_to_cpu(p->lv_ix) - 1;
- if (lv_ix > state->limit) {
+ if (lv_ix >= state->limit) {
cur_lv_ix = -1;
continue;
}