FreeBSD Bugzilla – Attachment 228550 Details for
Bug 259034
emulators/virtualbox-ose: networking: 14.0-CURRENT host epoch panic with a FreeBSD guest
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to avoid virtualbox host epoch panic
vboxpanic.patch (text/plain), 5.16 KB, created by
Don Lewis
on 2021-10-09 23:10:02 UTC
(
hide
)
Description:
patch to avoid virtualbox host epoch panic
Filename:
MIME Type:
Creator:
Don Lewis
Created:
2021-10-09 23:10:02 UTC
Size:
5.16 KB
patch
obsolete
>diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_VBoxNetFlt_freebsd_VBoxNetFlt-freebsd.c b/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_VBoxNetFlt_freebsd_VBoxNetFlt-freebsd.c >index 25df12a1546e..c74c379cfbc6 100644 >--- a/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_VBoxNetFlt_freebsd_VBoxNetFlt-freebsd.c >+++ b/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_VBoxNetFlt_freebsd_VBoxNetFlt-freebsd.c >@@ -168,15 +168,28 @@ > return VERR_NO_MEMORY; > } > >-@@ -574,6 +640,7 @@ int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *p >- ifp->if_input(ifp, m); >+@@ -571,9 +637,19 @@ int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *p >+ m_tag_prepend(m, mtag); >+ m->m_flags |= M_PKTHDR; >+ m->m_pkthdr.rcvif = ifp; >+- ifp->if_input(ifp, m); >++#if __FreeBSD_version >= 1300049 >++ { >++ struct epoch_tracker et; >++ NET_EPOCH_ENTER(et); >++#endif >++ ifp->if_input(ifp, m); >++#if __FreeBSD_version >= 1300049 >++ NET_EPOCH_EXIT(et); >++ } >++#endif > } > VBOXCURVNET_RESTORE(); > + IPRT_FREEBSD_RESTORE_EFL_AC(); > return VINF_SUCCESS; > } > >-@@ -586,6 +653,7 @@ static bool vboxNetFltFreeBsdIsPromiscuous(PVBOXNETFLT >+@@ -586,6 +662,7 @@ static bool vboxNetFltFreeBsdIsPromiscuous(PVBOXNETFLT > > int vboxNetFltOsInitInstance(PVBOXNETFLTINS pThis, void *pvContext) > { >@@ -184,7 +197,7 @@ > char nam[NG_NODESIZ]; > struct ifnet *ifp; > node_p node; >-@@ -594,7 +662,10 @@ int vboxNetFltOsInitInstance(PVBOXNETFLTINS pThis, voi >+@@ -594,7 +671,10 @@ int vboxNetFltOsInitInstance(PVBOXNETFLTINS pThis, voi > NOREF(pvContext); > ifp = ifunit(pThis->szName); > if (ifp == NULL) >@@ -195,7 +208,7 @@ > > /* Create a new netgraph node for this instance */ > if (ng_make_node_common(&ng_vboxnetflt_typestruct, &node) != 0) >-@@ -638,12 +709,14 @@ int vboxNetFltOsInitInstance(PVBOXNETFLTINS pThis, voi >+@@ -638,12 +718,14 @@ int vboxNetFltOsInitInstance(PVBOXNETFLTINS pThis, voi > vboxNetFltRelease(pThis, true /*fBusy*/); > } > VBOXCURVNET_RESTORE(); >@@ -210,7 +223,7 @@ > struct ifnet *ifp, *ifp0; > > ifp = ASMAtomicUoReadPtrT(&pThis->u.s.ifp, struct ifnet *); >-@@ -660,6 +733,7 @@ bool vboxNetFltOsMaybeRediscovered(PVBOXNETFLTINS pThi >+@@ -660,6 +742,7 @@ bool vboxNetFltOsMaybeRediscovered(PVBOXNETFLTINS pThi > pThis->u.s.node = NULL; > } > VBOXCURVNET_RESTORE(); >@@ -218,7 +231,7 @@ > > if (ifp0 != NULL) > { >-@@ -672,6 +746,7 @@ bool vboxNetFltOsMaybeRediscovered(PVBOXNETFLTINS pThi >+@@ -672,6 +755,7 @@ bool vboxNetFltOsMaybeRediscovered(PVBOXNETFLTINS pThi > > void vboxNetFltOsDeleteInstance(PVBOXNETFLTINS pThis) > { >@@ -226,7 +239,7 @@ > > taskqueue_drain(taskqueue_fast, &pThis->u.s.tskin); > taskqueue_drain(taskqueue_fast, &pThis->u.s.tskout); >-@@ -684,6 +759,7 @@ void vboxNetFltOsDeleteInstance(PVBOXNETFLTINS pThis) >+@@ -684,6 +768,7 @@ void vboxNetFltOsDeleteInstance(PVBOXNETFLTINS pThis) > ng_rmnode_self(pThis->u.s.node); > VBOXCURVNET_RESTORE(); > pThis->u.s.node = NULL; >@@ -234,7 +247,7 @@ > } > > int vboxNetFltOsPreInitInstance(PVBOXNETFLTINS pThis) >-@@ -697,6 +773,7 @@ int vboxNetFltOsPreInitInstance(PVBOXNETFLTINS pThis) >+@@ -697,6 +782,7 @@ int vboxNetFltOsPreInitInstance(PVBOXNETFLTINS pThis) > > void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, bool fActive) > { >@@ -242,7 +255,7 @@ > struct ifnet *ifp; > struct ifreq ifreq; > int error; >-@@ -730,7 +807,10 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, b >+@@ -730,7 +816,10 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, b > NG_MKMESSAGE(msg, NGM_GENERIC_COOKIE, NGM_CONNECT, > sizeof(struct ngm_connect), M_NOWAIT); > if (msg == NULL) >@@ -253,7 +266,7 @@ > con = (struct ngm_connect *)msg->data; > snprintf(con->path, NG_PATHSIZ, "vboxnetflt_%s:", ifp->if_xname); > strlcpy(con->ourhook, "lower", NG_HOOKSIZ); >-@@ -744,7 +824,10 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, b >+@@ -744,7 +833,10 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, b > NG_MKMESSAGE(msg, NGM_GENERIC_COOKIE, NGM_CONNECT, > sizeof(struct ngm_connect), M_NOWAIT); > if (msg == NULL) >@@ -264,7 +277,7 @@ > con = (struct ngm_connect *)msg->data; > snprintf(con->path, NG_PATHSIZ, "vboxnetflt_%s:", > ifp->if_xname); >-@@ -767,7 +850,10 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, b >+@@ -767,7 +859,10 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, b > NG_MKMESSAGE(msg, NGM_GENERIC_COOKIE, NGM_RMHOOK, > sizeof(struct ngm_rmhook), M_NOWAIT); > if (msg == NULL) >@@ -275,7 +288,7 @@ > rm = (struct ngm_rmhook *)msg->data; > strlcpy(rm->ourhook, "input", NG_HOOKSIZ); > NG_SEND_MSG_PATH(error, node, msg, path, 0); >-@@ -778,12 +864,16 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, b >+@@ -778,12 +873,16 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, b > NG_MKMESSAGE(msg, NGM_GENERIC_COOKIE, NGM_RMHOOK, > sizeof(struct ngm_rmhook), M_NOWAIT); > if (msg == NULL)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
grahamperrin
:
maintainer-approval?
(
vbox
)
Actions:
View
|
Diff
Attachments on
bug 259034
: 228550