Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jan 2015 07:59:51 +0000 (UTC)
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r276744 - in stable/10/sys/ofed/include: linux net
Message-ID:  <201501060759.t067xpgb049934@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rodrigc
Date: Tue Jan  6 07:59:50 2015
New Revision: 276744
URL: https://svnweb.freebsd.org/changeset/base/276744

Log:
  Merge r275599:
  Use CURVNET macros inside inet_get_local_port_range() function.
  Without this fix, a kernel with VIMAGE + Infiniband will panic on bootup.
  
  Certain necessary #include statements require LIST_HEAD.
  Add these includes to ofed/include/linux/list.h, because
  LIST_HEAD is specifically overridden in this file.
  
  PR: 191468
  Differential Revision: D1279
  Reviewed by: hselasky

Modified:
  stable/10/sys/ofed/include/linux/list.h
  stable/10/sys/ofed/include/net/ip.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/ofed/include/linux/list.h
==============================================================================
--- stable/10/sys/ofed/include/linux/list.h	Tue Jan  6 07:52:19 2015	(r276743)
+++ stable/10/sys/ofed/include/linux/list.h	Tue Jan  6 07:59:50 2015	(r276744)
@@ -40,6 +40,7 @@
 #include <sys/kernel.h>
 #include <sys/queue.h>
 #include <sys/cpuset.h>
+#include <sys/jail.h>
 #include <sys/lock.h>
 #include <sys/mutex.h>
 #include <sys/proc.h>
@@ -52,6 +53,7 @@
 #include <net/if.h>
 #include <net/if_types.h>
 #include <net/if_media.h>
+#include <net/vnet.h>
 
 #include <netinet/in.h>
 #include <netinet/in_pcb.h>

Modified: stable/10/sys/ofed/include/net/ip.h
==============================================================================
--- stable/10/sys/ofed/include/net/ip.h	Tue Jan  6 07:52:19 2015	(r276743)
+++ stable/10/sys/ofed/include/net/ip.h	Tue Jan  6 07:59:50 2015	(r276744)
@@ -45,8 +45,10 @@
 #ifdef INET
 static inline void inet_get_local_port_range(int *low, int *high)
 {
+	CURVNET_SET_QUIET(TD_TO_VNET(curthread));
 	*low = V_ipport_firstauto;
 	*high = V_ipport_lastauto;
+	CURVNET_RESTORE();
 }
 
 static inline void



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