Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Feb 2018 09:07:37 +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-11@freebsd.org
Subject:   svn commit: r329308 - stable/11/sys/contrib/rdma/krping
Message-ID:  <201802150907.w1F97bA1089122@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Thu Feb 15 09:07:37 2018
New Revision: 329308
URL: https://svnweb.freebsd.org/changeset/base/329308

Log:
  MFC r325805:
  Set the default VNET in krping before calling ifunit_ref(). Else using IPv6
  link-local addresses when VIMAGE is enabled will cause a so-called NULL
  pointer dereferencing issue.
  
  Sponsored by:	Mellanox Technologies

Modified:
  stable/11/sys/contrib/rdma/krping/krping.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/contrib/rdma/krping/krping.c
==============================================================================
--- stable/11/sys/contrib/rdma/krping/krping.c	Thu Feb 15 09:05:29 2018	(r329307)
+++ stable/11/sys/contrib/rdma/krping/krping.c	Thu Feb 15 09:07:37 2018	(r329308)
@@ -3185,7 +3185,9 @@ krping_get_ipv6_scope_id(char *name)
 
 	if (name == NULL)
 		return (0);
+	CURVNET_SET_QUIET(TD_TO_VNET(curthread));
 	ifp = ifunit_ref(name);
+	CURVNET_RESTORE();
 	if (ifp == NULL)
 		return (0);
 	retval = ifp->if_index;



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