lkml.org 
[lkml]   [2014]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.11 042/138] rbd: fix error paths in rbd_img_request_fill()
    Date
    3.11.10.11 -stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Ilya Dryomov <ilya.dryomov@inktank.com>

    commit 42dd037c08c7cd6e3e9af7824b0c1d063f838885 upstream.

    Doing rbd_obj_request_put() in rbd_img_request_fill() error paths is
    not only insufficient, but also triggers an rbd_assert() in
    rbd_obj_request_destroy():

    Assertion failure in rbd_obj_request_destroy() at line 1867:

    rbd_assert(obj_request->img_request == NULL);

    rbd_img_obj_request_add() adds obj_requests to the img_request, the
    opposite is rbd_img_obj_request_del(). Use it.

    Fixes: http://tracker.ceph.com/issues/7327

    Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
    Reviewed-by: Alex Elder <elder@linaro.org>
    Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
    ---
    drivers/block/rbd.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
    index 1af45c286501..eebf3d6ec8db 100644
    --- a/drivers/block/rbd.c
    +++ b/drivers/block/rbd.c
    @@ -2268,7 +2268,7 @@ out_partial:
    rbd_obj_request_put(obj_request);
    out_unwind:
    for_each_obj_request_safe(img_request, obj_request, next_obj_request)
    - rbd_obj_request_put(obj_request);
    + rbd_img_obj_request_del(img_request, obj_request);

    return -ENOMEM;
    }
    --
    1.9.1


    \
     
     \ /
      Last update: 2014-06-03 16:41    [W:3.941 / U:0.264 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site