linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: [PATCH] infiniband:core:Fix error handling in the function join_handler
       [not found] ` <1441593769-14864-1-git-send-email-xerofoify-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-09-08 16:50   ` Hefty, Sean
  0 siblings, 0 replies; only message in thread
From: Hefty, Sean @ 2015-09-08 16:50 UTC (permalink / raw)
  To: Nicholas Krause, dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w, Weiny, Ira,
	jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
	yun.wang-EIkl63zCoXaH+58JC4qpiA, monis-VPRAkNaXOzVWk0Htik3J/w,
	jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

> diff --git a/drivers/infiniband/core/multicast.c
> b/drivers/infiniband/core/multicast.c
> index 2cb865c..9284337 100644
> --- a/drivers/infiniband/core/multicast.c
> +++ b/drivers/infiniband/core/multicast.c
> @@ -526,8 +526,9 @@ static void join_handler(int status, struct
> ib_sa_mcmember_rec *rec,
>  		process_join_error(group, status);
>  	else {
>  		int mgids_changed, is_mgid0;
> -		ib_find_pkey(group->port->dev->device, group->port->port_num,
> -			     be16_to_cpu(rec->pkey), &pkey_index);
> +		if (ib_find_pkey(group->port->dev->device, group->port-
> >port_num,
> +				 be16_to_cpu(rec->pkey), &pkey_index))
> +			return;

We can't just abort here.  Apps are waiting on a callback to their join operation, and the SA believes that this port is part of the multicast group.

If we don't get a valid pkey, the group will be left set to 'MCAST_INVALID_PKEY_INDEX'. 

- Sean

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-08 16:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1441593769-14864-1-git-send-email-xerofoify@gmail.com>
     [not found] ` <1441593769-14864-1-git-send-email-xerofoify-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-08 16:50   ` [PATCH] infiniband:core:Fix error handling in the function join_handler Hefty, Sean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).