IB/ipath: validate path_mig_state properly

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
Bryan O'Sullivan 2006-08-25 11:24:42 -07:00 коммит произвёл Roland Dreier
Родитель fc8cf8cdfc
Коммит ca4ce383ac
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -491,7 +491,8 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
goto inval;
if (attr_mask & IB_QP_PATH_MIG_STATE)
if (attr->path_mig_state != IB_MIG_MIGRATED)
if (attr->path_mig_state != IB_MIG_MIGRATED &&
attr->path_mig_state != IB_MIG_REARM)
goto inval;
switch (new_state) {