[ofa-general] PATCH 1/1 - fix kernel crash in mad.c when IB_MAD_RESULT_(SUCCESS|CONSUMED) returned

Hal Rosenstock hrosenstock at xsigo.com
Tue May 20 15:34:03 PDT 2008


On Tue, 2008-05-20 at 15:08 -0700, Dave Olson wrote:
> Ralph Campbell will submit this patch for ofed 1.3.1, also.
> 
> IB/MAD - fix crash when HCA returns IB_MAD_RESULT_SUCCESS|IB_MAD_RESULT_CONSUMED
> 
> This was observed with the hw/ipath driver, but could happen with any
> driver.  

Does this also occur with mthca/mlx4 ? Was the same thing that caused
this on ipath tried with either of these HCAs ?

> It's OFED bug 1027.

What's the port disable command which causes this crash ?

-- Hal

> The fix is to kfree the local data and break, rather than falling through.
> 
> Signed-off-by: Dave Olson <dave.olson at qlogic.com>
> 
> --- a/drivers/infiniband/core/mad.c
> +++ b/drivers/infiniband/core/mad.c
> @@ -747,7 +747,8 @@ static int handle_outgoing_dr_smp(struct
> ib_mad_agent_private *mad_agent_priv,
>                 break;
>         case IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_CONSUMED:
>                 kmem_cache_free(ib_mad_cache, mad_priv);
> -               break;
> +               kfree(local);
> +               goto out;
>         case IB_MAD_RESULT_SUCCESS:
>                 /* Treat like an incoming receive MAD */
>                 port_priv = ib_get_mad_port(mad_agent_priv->agent.device,
> 
> Dave Olson
> dave.olson at qlogic.com
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general




More information about the general mailing list