gif_transmit() must always be called in the network epoch.

This commit is contained in:
Gleb Smirnoff 2020-01-15 06:18:32 +00:00
parent ed0282f46a
commit 9758a507e9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=356757
2 changed files with 1 additions and 4 deletions

View File

@ -272,7 +272,7 @@ gif_transmit(struct ifnet *ifp, struct mbuf *m)
uint8_t proto, ecn;
int error;
GIF_RLOCK();
NET_EPOCH_ASSERT();
#ifdef MAC
error = mac_ifnet_check_transmit(ifp, m);
if (error) {
@ -370,7 +370,6 @@ gif_transmit(struct ifnet *ifp, struct mbuf *m)
err:
if (error)
if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
GIF_RUNLOCK();
return (error);
}

View File

@ -97,8 +97,6 @@ struct etherip_header {
/* mbuf adjust factor to force 32-bit alignment of IP header */
#define ETHERIP_ALIGN 2
#define GIF_RLOCK() struct epoch_tracker gif_et; epoch_enter_preempt(net_epoch_preempt, &gif_et)
#define GIF_RUNLOCK() epoch_exit_preempt(net_epoch_preempt, &gif_et)
#define GIF_WAIT() epoch_wait_preempt(net_epoch_preempt)
/* Prototypes */