From: Bryan O'Sullivan Date: Fri, 25 Aug 2006 18:24:42 +0000 (-0700) Subject: IB/ipath: validate path_mig_state properly X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=ca4ce383acfb05b8035453cdbbfd4f8ae36c7a69;p=openwrt%2Fstaging%2Fblogic.git IB/ipath: validate path_mig_state properly Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/ipath/ipath_qp.c b/drivers/infiniband/hw/ipath/ipath_qp.c index 502d555fdf37..77391886d2f8 100644 --- a/drivers/infiniband/hw/ipath/ipath_qp.c +++ b/drivers/infiniband/hw/ipath/ipath_qp.c @@ -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) {