Skip to contentSkip to conversation

infiniband:core:Fix error handling in the function join_handler

PATCH Hefty, Sean 1 participant 1 message Sep 8, 2015 1 message not in the archive InfiniBand

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 6 lines
drivers/infiniband/core/multicast.c +0 -0
index 2cb865c..9284337 100644

drivers/infiniband/core/multicast.c static void join_handler(int status, struct · line 533

Quoted 10 lines
drivers/infiniband/core/multicast.c +3 -2
@@ -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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html