aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTai-hwa Liang <avatar@FreeBSD.org>2021-04-10 15:32:27 +0000
committerTai-hwa Liang <avatar@FreeBSD.org>2021-05-17 09:23:00 +0000
commit33f31648b93e37aa746c5cde68c61b66564f1759 (patch)
tree488cda2eaee19dbb13ad318af6e448893a04aafd
parent5e4388126aac3c3065a8c64518130eeba856409d (diff)
downloadsrc-33f31648b93e37aa746c5cde68c61b66564f1759.tar.gz
src-33f31648b93e37aa746c5cde68c61b66564f1759.zip
if_firewire: fixing panic upon packet reception for VNET build
netisr_dispatch_src() needs valid VNET pointer or firewire_input() will panic when receiving a packet. Reviewed by: glebius MFC after: 2 weeks (cherry picked from commit d9b61e7153c64b141436b4d9619b166c6d35a0a6)
-rw-r--r--sys/net/if_fwsubr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/net/if_fwsubr.c b/sys/net/if_fwsubr.c
index f0f6de598f8d..d091d6518060 100644
--- a/sys/net/if_fwsubr.c
+++ b/sys/net/if_fwsubr.c
@@ -632,7 +632,9 @@ firewire_input(struct ifnet *ifp, struct mbuf *m, uint16_t src)
}
M_SETFIB(m, ifp->if_fib);
+ CURVNET_SET_QUIET(ifp->if_vnet);
netisr_dispatch(isr, m);
+ CURVNET_RESTORE();
}
int