Re: [PATCH] infiniband:Fix error checking in the function ocrdma_dereg_mr

From: Jason Gunthorpe
Date: Fri Sep 04 2015 - 13:01:24 EST

On Fri, Sep 04, 2015 at 12:45:38PM -0400, Doug Ledford wrote:
> On 09/04/2015 12:35 PM, Nicholas Krause wrote:
> > This fixes error checking in the function ocrdma_dereg_mr to properly
> > check if the call to ocrdma_mbx_alloc fails as if so we must exit this
> > function immediately and return the error code to the caller of the
> > function ocrdma_dereg_mr to signal a non recoverable error has occurred
> > when calling this function that needs to be handled by the caller in its
> > own intended error paths.
> This is probably not the right solution here.

Indeed, it is my long term goal to remove error reporting from
'dealloc' style driver functions.

Only Emulex's driver reports errors here, and *nothing* pays attention
to them, or has any recovery strategy.

The best iterm option is to WARN_ON here:

> > - (void) ocrdma_mbx_dealloc_lkey(dev, mr->hwmr.fr_mr, mr->hwmr.lkey);
> > + ret = ocrdma_mbx_dealloc_lkey(dev, mr->hwmr.fr_mr, mr->hwmr.lkey);

And Emulex should work to fix their driver so dealloc failures are
either impossible or cause a full device reset of some kind.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at