]> git.karo-electronics.de Git - karo-tx-linux.git/commit
crush: ensure bucket id is valid before indexing buckets array
authorIlya Dryomov <idryomov@gmail.com>
Sun, 31 Jan 2016 13:35:59 +0000 (14:35 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 3 Feb 2016 13:37:10 +0000 (14:37 +0100)
commit3b723e72440809a19ea8e2493abfcbd0dc741864
tree01ec95389acdeba3651745a1a9457d976c011152
parent29af9c6cd89463548f8785f5c93e203738cdb68c
crush: ensure bucket id is valid before indexing buckets array

We were indexing the buckets array without verifying the index was
within the [0,max_buckets) range.  This could happen because
a multistep rule does not have enough buckets and has CRUSH_ITEM_NONE
for an intermediate result, which would feed in CRUSH_ITEM_NONE and
make us crash.

Reflects ceph.git commit 976a24a326da8931e689ee22fce35feab5b67b76.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/crush/mapper.c