[ofa-general] RE: [PATCH v2] RDMA/nes: Account for freed pbl after hw operation

Wood, Donald E donald.e.wood at intel.com
Mon Feb 2 15:07:56 PST 2009



> > @@ -572,6 +573,8 @@ static int nes_dealloc_fmr(struct ib_fmr *ibfmr)
> >  	nesmr->ibmw.rkey = ibfmr->rkey;
> >  	nesmr->ibmw.uobject = NULL;
> >  
> > +	rc = nes_dealloc_mw(&nesmr->ibmw);
> > +
> >  	if (nesfmr->nesmr.pbls_used != 0) {
> >  		spin_lock_irqsave(&nesadapter->pbl_lock, flags);
> >  		if (nesfmr->nesmr.pbl_4k) {
>
> Can this be right?  nes_dealloc_mw() fails, so the HW still thinks it
> owns the resources, and then the function just continues and releases
> the PBLs before returning?

You are right, the code in nes_dealloc_fmr is missing a check 
of the return code.  This will be updated in a patch to follow.

> [And same issue seems to be there for the change to nes_dereg_mr]

I believe that nes_dereg_mr is correctly checking return codes 
and does not need to be changed.  Please let me know if you 
still see a problem here.

Don Wood



More information about the general mailing list