diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2015-01-06 07:59:50 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2015-01-06 07:59:50 +0000 |
commit | 75f76c6f31ea7e0033d76497bdda17166dce8237 (patch) | |
tree | 2fcb37b3ef21bcc1034845293dc983d40aa41ef1 | |
parent | 6a7ad120864bf269d1ef19a90ace5c2889c117b4 (diff) | |
download | FreeBSD-src-75f76c6f31ea7e0033d76497bdda17166dce8237.zip FreeBSD-src-75f76c6f31ea7e0033d76497bdda17166dce8237.tar.gz |
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
-rw-r--r-- | sys/ofed/include/linux/list.h | 2 | ||||
-rw-r--r-- | sys/ofed/include/net/ip.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/ofed/include/linux/list.h b/sys/ofed/include/linux/list.h index a3becab..b939ba5 100644 --- a/sys/ofed/include/linux/list.h +++ b/sys/ofed/include/linux/list.h @@ -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> diff --git a/sys/ofed/include/net/ip.h b/sys/ofed/include/net/ip.h index 9d81ba6..32cc186 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 |