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
MFC after:	1 week
This commit is contained in:
Andrey V. Elsukov 2019-02-13 15:46:05 +00:00
parent fa91f84502
commit c7ee62fcd5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=344103

View File

@ -1565,6 +1565,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;
@ -1597,6 +1598,7 @@ in_pcbfree_deferred(epoch_context_t ctx)
#ifdef INET
inp_freemoptions(imo);
#endif
CURVNET_RESTORE();
}
/*