rbd: fix null dereference in dout
authorJosh Durgin <josh.durgin@inktank.com>
Thu, 29 Aug 2013 00:08:10 +0000 (17:08 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2014 20:24:26 +0000 (12:24 -0800)
commitdd932ee7a2453d86c920d3bbd2938602c5c9aaca
tree0577bef9a91c9d8bcef21589eff94826e7484538
parentb33b7132f0feeb0716390330bd5d53fabe057f25
rbd: fix null dereference in dout

commit c35455791c1131e7ccbf56ea6fbdd562401c2ce2 upstream.

The order parameter is sometimes NULL in _rbd_dev_v2_snap_size(), but
the dout() always derefences it. Move this to another dout() protected
by a check that order is non-NULL.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Alex Elder <alex.elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/rbd.c