libceph: fix crush_decode() call site in osdmap_decode()
authorIlya Dryomov <ilya.dryomov@inktank.com>
Thu, 13 Mar 2014 14:36:15 +0000 (16:36 +0200)
committerSage Weil <sage@inktank.com>
Sat, 5 Apr 2014 04:07:43 +0000 (21:07 -0700)
commit9902e682c7f3df9ed5f60bc6f9c7efa6fd6b2d1d
tree2f8d6bbb7bd710aca4689662a8877666e1ac5eae
parent2d88b2e0819e0401ebb195e9fa20fab4be1965c8
libceph: fix crush_decode() call site in osdmap_decode()

The size of the memory area feeded to crush_decode() should be limited
not only by osdmap end, but also by the crush map length.  Also, drop
unnecessary dout() (dout() in crush_decode() conveys the same info) and
step past crush map only if it is decoded successfully.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Alex Elder <elder@linaro.org>
net/ceph/osdmap.c