svn commit: r341525 - head/sys/ofed/drivers/infiniband/core

Slava Shwartsman slavash at FreeBSD.org
Wed Dec 5 13:20:23 UTC 2018


Author: slavash
Date: Wed Dec  5 13:20:22 2018
New Revision: 341525
URL: https://svnweb.freebsd.org/changeset/base/341525

Log:
  ibcore: Check ib_find_pkey() return value.
  
  Linux commit:
  d3a2418ee36a59bc02e9d454723f3175dcf4bfd9
  
  Submitted by:   hselasky@
  Approved by:    hselasky (mentor)
  MFC after:      1 week
  Sponsored by:   Mellanox Technologies

Modified:
  head/sys/ofed/drivers/infiniband/core/ib_multicast.c

Modified: head/sys/ofed/drivers/infiniband/core/ib_multicast.c
==============================================================================
--- head/sys/ofed/drivers/infiniband/core/ib_multicast.c	Wed Dec  5 13:19:52 2018	(r341524)
+++ head/sys/ofed/drivers/infiniband/core/ib_multicast.c	Wed Dec  5 13:20:22 2018	(r341525)
@@ -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