svn commit: r341864 - stable/11/sys/ofed/drivers/infiniband/core

Hans Petter Selasky hselasky at FreeBSD.org
Wed Dec 12 10:26:50 UTC 2018


Author: hselasky
Date: Wed Dec 12 10:26:49 2018
New Revision: 341864
URL: https://svnweb.freebsd.org/changeset/base/341864

Log:
  MFC r341525:
  ibcore: Check ib_find_pkey() return value.
  
  Linux commit:
  d3a2418ee36a59bc02e9d454723f3175dcf4bfd9
  
  Sponsored by:   Mellanox Technologies

Modified:
  stable/11/sys/ofed/drivers/infiniband/core/ib_multicast.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_multicast.c
==============================================================================
--- stable/11/sys/ofed/drivers/infiniband/core/ib_multicast.c	Wed Dec 12 10:25:55 2018	(r341863)
+++ stable/11/sys/ofed/drivers/infiniband/core/ib_multicast.c	Wed Dec 12 10:26:49 2018	(r341864)
@@ -525,8 +525,9 @@ static void join_handler(int status, struct ib_sa_mcme
 		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))
+			pkey_index = MCAST_INVALID_PKEY_INDEX;
 
 		spin_lock_irq(&group->port->lock);
 		if (group->state == MCAST_BUSY &&


More information about the svn-src-all mailing list