diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2020-02-03 20:48:57 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2020-02-03 20:48:57 +0000 |
commit | 0017b2adac63706972260eab91e8ba8c3e7637ce (patch) | |
tree | 7e3d4fad1f36cd4c736384c5dfe0c4081121b43a /sys/kern/kern_mbuf.c | |
parent | 446d49d762176317db442444527affa744cce249 (diff) | |
download | src-0017b2adac63706972260eab91e8ba8c3e7637ce.tar.gz src-0017b2adac63706972260eab91e8ba8c3e7637ce.zip |
Couple protocol drain routines (frag6_drain and sctp_drain) may send
packets. An unexpected behaviour for memory reclamation routine.
Anyway, we need enter the network epoch for doing that.
Notes
Notes:
svn path=/head/; revision=357466
Diffstat (limited to 'sys/kern/kern_mbuf.c')
-rw-r--r-- | sys/kern/kern_mbuf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index b5dcd808a9b1..0b3d1738c66a 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -829,15 +829,18 @@ mb_ctor_pack(void *mem, int size, void *arg, int how) static void mb_reclaim(uma_zone_t zone __unused, int pending __unused) { + struct epoch_tracker et; struct domain *dp; struct protosw *pr; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK | WARN_PANIC, NULL, __func__); + NET_EPOCH_ENTER(et); for (dp = domains; dp != NULL; dp = dp->dom_next) for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) if (pr->pr_drain != NULL) (*pr->pr_drain)(); + NET_EPOCH_EXIT(et); } /* |