lkml.org 
[lkml]   [2018]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.19 143/361] RDMA/cm: Respect returned status of cm_init_av_by_path
    Date
    4.19-stable review patch.  If anyone has any objections, please let me know.

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

    From: Leon Romanovsky <leonro@mellanox.com>

    [ Upstream commit e54b6a3bcd1ec972b25a164bdf495d9e7120b107 ]

    Add missing check for failure of cm_init_av_by_path

    Fixes: e1444b5a163e ("IB/cm: Fix automatic path migration support")
    Reported-by: Slava Shwartsman <slavash@mellanox.com>
    Reviewed-by: Parav Pandit <parav@mellanox.com>
    Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
    Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/infiniband/core/cm.c | 7 +++++--
    1 file changed, 5 insertions(+), 2 deletions(-)

    --- a/drivers/infiniband/core/cm.c
    +++ b/drivers/infiniband/core/cm.c
    @@ -3292,8 +3292,11 @@ static int cm_lap_handler(struct cm_work
    if (ret)
    goto unlock;

    - cm_init_av_by_path(param->alternate_path, NULL, &cm_id_priv->alt_av,
    - cm_id_priv);
    + ret = cm_init_av_by_path(param->alternate_path, NULL,
    + &cm_id_priv->alt_av, cm_id_priv);
    + if (ret)
    + goto unlock;
    +
    cm_id_priv->id.lap_state = IB_CM_LAP_RCVD;
    cm_id_priv->tid = lap_msg->hdr.tid;
    ret = atomic_inc_and_test(&cm_id_priv->work_count);

    \
     
     \ /
      Last update: 2018-11-11 23:28    [W:4.078 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site