svn commit: r356757 - head/sys/net
Gleb Smirnoff
glebius at FreeBSD.org
Wed Jan 15 06:18:33 UTC 2020
Author: glebius
Date: Wed Jan 15 06:18:32 2020
New Revision: 356757
URL: https://svnweb.freebsd.org/changeset/base/356757
Log:
gif_transmit() must always be called in the network epoch.
Modified:
head/sys/net/if_gif.c
head/sys/net/if_gif.h
Modified: head/sys/net/if_gif.c
==============================================================================
--- head/sys/net/if_gif.c Wed Jan 15 06:12:39 2020 (r356756)
+++ head/sys/net/if_gif.c Wed Jan 15 06:18:32 2020 (r356757)
@@ -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);
}
Modified: head/sys/net/if_gif.h
==============================================================================
--- head/sys/net/if_gif.h Wed Jan 15 06:12:39 2020 (r356756)
+++ head/sys/net/if_gif.h Wed Jan 15 06:18:32 2020 (r356757)
@@ -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 */
More information about the svn-src-all
mailing list