Userspace SRQs don't have a buffer allocated for them in the kernel, so
it doesn't make sense to set srq->last during initialization. In fact,
this can crash trying to follow a nonexistent buffer pointer.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
scatter->lkey = cpu_to_be32(MTHCA_INVAL_LKEY);
}
scatter->lkey = cpu_to_be32(MTHCA_INVAL_LKEY);
}
+ srq->last = get_wqe(srq, srq->max - 1);
+
srq->first_free = 0;
srq->last_free = srq->max - 1;
srq->first_free = 0;
srq->last_free = srq->max - 1;
- srq->last = get_wqe(srq, srq->max - 1);