From ed26465e66e0a13c00eefe7c0eefcc52b7b6ff9e Mon Sep 17 00:00:00 2001 From: rodrigc Date: Tue, 6 Jan 2015 08:03:01 +0000 Subject: [PATCH] Merge r276744: 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 git-svn-id: svn://svn.freebsd.org/base/stable/9@276745 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/ofed/include/linux/list.h | 2 ++ sys/ofed/include/net/ip.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sys/ofed/include/linux/list.h b/sys/ofed/include/linux/list.h index a3becab89..b939ba5e2 100644 --- a/sys/ofed/include/linux/list.h +++ b/sys/ofed/include/linux/list.h @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -52,6 +53,7 @@ #include #include #include +#include #include #include diff --git a/sys/ofed/include/net/ip.h b/sys/ofed/include/net/ip.h index 9d81ba6d6..32cc18646 100644 --- a/sys/ofed/include/net/ip.h +++ b/sys/ofed/include/net/ip.h @@ -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 -- 2.45.0