Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca4ce383 authored by Bryan O'Sullivan's avatar Bryan O'Sullivan Committed by Roland Dreier
Browse files

IB/ipath: validate path_mig_state properly

parent fc8cf8cd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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) {