Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1220995

RE: [PATCH] infiniband:core:Fix error handling in the function join_handler

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From "Hefty, Sean" <sean.hefty@intel.com>
Newsgroups linux.kernel
Subject RE: [PATCH] infiniband:core:Fix error handling in the function join_handler
Date Tue, 08 Sep 2015 19:00:03 +0200
Message-ID <q6upt-1Fu-19@gated-at.bofh.it> (permalink)
References <q6upt-1Fu-21@gated-at.bofh.it>
X-Original-To Nicholas Krause <xerofoify@gmail.com>, "dledford@redhat.com" <dledford@redhat.com>
X-Extloop1 1
X-Ironport-Av E=Sophos;i="5.17,491,1437462000"; d="scan'208";a="764813766"
Thread-Topic [PATCH] infiniband:core:Fix error handling in the function join_handler
Thread-Index AQHQ6RbnJ/cqaInwzE2QUv5OfVK3g54y2QzQ
Accept-Language en-US
Content-Language en-US
X-Originating-IP [10.22.254.138]
Content-Type text/plain; charset="Windows-1252"
Content-Transfer-Encoding 8BIT
MIME-Version 1.0
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 28
Organization linux.* mail to news gateway
X-Original-Cc "hal.rosenstock@gmail.com" <hal.rosenstock@gmail.com>, "Weiny, Ira" <ira.weiny@intel.com>, "jgunthorpe@obsidianresearch.com" <jgunthorpe@obsidianresearch.com>, "yun.wang@profitbricks.com" <yun.wang@profitbricks.com>, "monis@mellanox.com" <monis@mellanox.com>, "jackm@dev.mellanox.co.il" <jackm@dev.mellanox.co.il>, "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
X-Original-Date Tue, 8 Sep 2015 16:50:03 +0000
X-Original-Message-ID <1828884A29C6694DAF28B7E6B8A82373A903955A@ORSMSX109.amr.corp.intel.com>
X-Original-References <1441593769-14864-1-git-send-email-xerofoify@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1220995

Show key headers only | View raw


> 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-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

RE: [PATCH] infiniband:core:Fix error handling in the function  join_handler "Hefty, Sean" <sean.hefty@intel.com> - 2015-09-08 19:00 +0200

csiph-web