libceph: check for invalid mapping
authorSage Weil <sage@inktank.com>
Tue, 25 Sep 2012 03:59:48 +0000 (20:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Nov 2012 08:56:50 +0000 (09:56 +0100)
commit343c7f0dcb36f71bc4edfc602eb8c20faf88fa65
tree0f9aaa44e031956847907210297737dc495ab08b
parent1ad6768c537d57fec3dcb249cd384332cfacfe24
libceph: check for invalid mapping

commit d63b77f4c552cc3a20506871046ab0fcbc332609 upstream.

If we encounter an invalid (e.g., zeroed) mapping, return an error
and avoid a divide by zero.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Alex Elder <elder@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/ceph/osd_client.h
include/linux/ceph/osdmap.h
net/ceph/osd_client.c
net/ceph/osdmap.c