Commit 9f7a37ef authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Greg Kroah-Hartman

RDMA/cm: Respect returned status of cm_init_av_by_path

[ Upstream commit e54b6a3b ]

Add missing check for failure of cm_init_av_by_path

Fixes: e1444b5a ("IB/cm: Fix automatic path migration support")
Reported-by: default avatarSlava Shwartsman <slavash@mellanox.com>
Reviewed-by: default avatarParav Pandit <parav@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bc280cf5
...@@ -3292,8 +3292,11 @@ static int cm_lap_handler(struct cm_work *work) ...@@ -3292,8 +3292,11 @@ static int cm_lap_handler(struct cm_work *work)
if (ret) if (ret)
goto unlock; goto unlock;
cm_init_av_by_path(param->alternate_path, NULL, &cm_id_priv->alt_av, ret = cm_init_av_by_path(param->alternate_path, NULL,
cm_id_priv); &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->id.lap_state = IB_CM_LAP_RCVD;
cm_id_priv->tid = lap_msg->hdr.tid; cm_id_priv->tid = lap_msg->hdr.tid;
ret = atomic_inc_and_test(&cm_id_priv->work_count); ret = atomic_inc_and_test(&cm_id_priv->work_count);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment