[ofa-general] Re: [PATCH for 2.6.28] core: fix memory leak in XRC userspace cleanup.

Roland Dreier rdreier at cisco.com
Tue Aug 12 12:42:45 PDT 2008


 > ++	if (!ret) {
 > ++		list_for_each_entry(t_uobj, &file->ucontext->qp_list, list) {
 > ++			struct ib_qp *qp = t_uobj->object;
 > ++			if (qp->xrcd && qp->xrcd == uobj->object) {
 > ++				ret = -EBUSY;
 > ++				break;
 > ++			}
 > ++		}
 > ++	}
 > ++	if (!ret) {
 > ++		list_for_each_entry(t_uobj, &file->ucontext->srq_list, list) {
 > ++			struct ib_srq *srq = t_uobj->object;
 > ++			if (srq->xrcd && srq->xrcd == uobj->object) {
 > ++				ret = -EBUSY;
 > ++				break;
 > ++			}
 > ++		}
 > ++	}

This is obviously pretty gross.  Let me see it I can come up with a more
palatable fix in my tree.

 - R.



More information about the general mailing list