]> git.baikalelectronics.ru Git - kernel.git/commit
rbd: get/put img_request in rbd_img_request_submit()
authorIlya Dryomov <idryomov@gmail.com>
Mon, 16 May 2016 11:18:57 +0000 (13:18 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 25 May 2016 22:36:20 +0000 (00:36 +0200)
commit2f92e6511fcb845db54f929a9cbc00f00e289fd0
treea466793ccab81b82ae6bc36440db64bb0e6c512a
parent8d11520707e21fe2d070b5726c43f63d6e45fdcd
rbd: get/put img_request in rbd_img_request_submit()

By the time we get to checking for_each_obj_request_safe(img_request)
terminating condition, all obj_requests may be complete and img_request
ref, that rbd_img_request_submit() takes away from its caller, may be
put.  Moving the next_obj_request cursor is then a use-after-free on
img_request.

It's totally benign, as the value that's read is never used, but
I think it's still worth fixing.

Cc: Alex Elder <elder@linaro.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
drivers/block/rbd.c