Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Dec 2018 10:25:55 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r341863 - stable/12/sys/ofed/drivers/infiniband/core
Message-ID:  <201812121025.wBCAPt0s013552@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Dec 12 10:25:55 2018
New Revision: 341863
URL: https://svnweb.freebsd.org/changeset/base/341863

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

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

Modified: stable/12/sys/ofed/drivers/infiniband/core/ib_multicast.c
==============================================================================
--- stable/12/sys/ofed/drivers/infiniband/core/ib_multicast.c	Wed Dec 12 10:24:43 2018	(r341862)
+++ stable/12/sys/ofed/drivers/infiniband/core/ib_multicast.c	Wed Dec 12 10:25:55 2018	(r341863)
@@ -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 &&



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812121025.wBCAPt0s013552>