[openib-general] [PATCH] mad: Validate *bad_send_wr in ib_post_send_mad()

Sean Hefty mshefty at ichips.intel.com
Mon Nov 1 15:52:41 PST 2004


On Mon, 01 Nov 2004 18:59:08 -0500
Hal Rosenstock <halr at voltaire.com> wrote:

> mad: Validate *bad_send_wr in ib_post_send_mad()
> 
> Index: mad.c
> ===================================================================
> --- mad.c	(revision 1109)
> +++ mad.c	(working copy)
> @@ -369,7 +369,7 @@
>  	struct ib_mad_port_private	*port_priv;
>  
>  	/* Validate supplied parameters */
> -	if (!mad_agent || !send_wr) {
> +	if (!mad_agent || !send_wr || !*bad_send_wr) {
>  		*bad_send_wr = send_wr;

We can't set bad_send_wr if it's invalid.

- Sean



More information about the general mailing list