]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crush: fix map->choose_tries boundary test 922/head
authorLoic Dachary <loic@dachary.org>
Sun, 8 Dec 2013 13:38:59 +0000 (14:38 +0100)
committerLoic Dachary <loic@dachary.org>
Sun, 8 Dec 2013 16:00:54 +0000 (17:00 +0100)
commit5e0722fab5e548564a965b4af25d38f3eb106b49
tree484202294502623e9c448d978cd2375534ae7de3
parent94da2153d1e131205c0e5e32601d0b6a9f6a3cfd
crush: fix map->choose_tries boundary test

CrushWrapper::start_choose_profile allocates map->choose_tries with
choose_total_tries elements. When crush_choose_firstn sets a value, it
tests against map->choose_local_tries which could lead to memory
corruption if map->choose_total_tries is smaller than
map->choose_local_tries.

Another indesirable but non fatal side effect is that the output crushtool
--show-choose-tries will be truncated to choose_local_tries which is
set to a lower value than choose_total_tries by the default tuneables.

Signed-off-by: Loic Dachary <loic@dachary.org>
src/crush/mapper.c