summaryrefslogtreecommitdiff
path: root/drivers/xen
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-01-10 18:56:58 (GMT)
committerAlex Elder <elder@inktank.com>2013-01-25 23:33:14 (GMT)
commit38901e0f240b634467fb31743365af80a006be33 (patch)
treed69c8ed51d926b9bc79b2e7a6c078be3d79cb55f /drivers/xen
parent98571b5aa776d4a69eadd7d4e5c9d4e69365ab9a (diff)
downloadlinux-fsl-qoriq-38901e0f240b634467fb31743365af80a006be33.tar.xz
rbd: check for overflow in rbd_get_num_segments()
The return type of rbd_get_num_segments() is int, but the values it operates on are u64. Although it's not likely, there's no guarantee the result won't exceed what can be respresented in an int. The function is already designed to return -ERANGE on error, so just add this possible overflow as another reason to return that. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'drivers/xen')
0 files changed, 0 insertions, 0 deletions