rbd: do a safe list traversal in rbd_img_request_submit()
authorAlex Elder <elder@inktank.com>
Wed, 10 Apr 2013 22:47:46 +0000 (17:47 -0500)
committerSage Weil <sage@inktank.com>
Wed, 17 Apr 2013 18:39:09 +0000 (11:39 -0700)
commit46faeed4a61e220b99591e9773057160eb437cc8
treecba50f0421c71726396cf1d527570046ba117cc6
parent6e2a4505dba0cae8faa701426185dfb7b49f537c
rbd: do a safe list traversal in rbd_img_request_submit()

It's possible that the reference to the object request dropped
inside the loop in rbd_img_request_submit() will be the last
one, in which case the content of the object pointer can't be
trusted.

Use a safe form of the object request list traversal to avoid
problems.

This resolves:
    http://tracker.ceph.com/issues/4705

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c