svn commit: r344356 - stable/12/sys/netinet
Andrey V. Elsukov
ae at FreeBSD.org
Wed Feb 20 10:22:49 UTC 2019
Author: ae
Date: Wed Feb 20 10:22:48 2019
New Revision: 344356
URL: https://svnweb.freebsd.org/changeset/base/344356
Log:
MFC r344103:
In r335015 PCB destroing was made deferred using epoch_call().
But ipsec_delete_pcbpolicy() uses some VNET-virtualized variables,
and thus it needs VNET context, that is missing during gtaskqueue
executing. Use inp_vnet context to set curvnet in in_pcbfree_deferred().
PR: 235684
Modified:
stable/12/sys/netinet/in_pcb.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/netinet/in_pcb.c
==============================================================================
--- stable/12/sys/netinet/in_pcb.c Wed Feb 20 10:03:03 2019 (r344355)
+++ stable/12/sys/netinet/in_pcb.c Wed Feb 20 10:22:48 2019 (r344356)
@@ -1566,6 +1566,7 @@ in_pcbfree_deferred(epoch_context_t ctx)
inp = __containerof(ctx, struct inpcb, inp_epoch_ctx);
INP_WLOCK(inp);
+ CURVNET_SET(inp->inp_vnet);
#ifdef INET
struct ip_moptions *imo = inp->inp_moptions;
inp->inp_moptions = NULL;
@@ -1598,6 +1599,7 @@ in_pcbfree_deferred(epoch_context_t ctx)
#ifdef INET
inp_freemoptions(imo);
#endif
+ CURVNET_RESTORE();
}
/*
More information about the svn-src-all
mailing list