Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107036356
D28858.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D28858.diff
View Options
diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c
--- a/sys/net/bridgestp.c
+++ b/sys/net/bridgestp.c
@@ -154,6 +154,8 @@
static void
bstp_transmit(struct bstp_state *bs, struct bstp_port *bp)
{
+ NET_EPOCH_ASSERT();
+
if (bs->bs_running == 0)
return;
@@ -346,6 +348,7 @@
struct ether_header *eh;
BSTP_LOCK_ASSERT(bs);
+ NET_EPOCH_ASSERT();
ifp = bp->bp_ifp;
@@ -923,6 +926,8 @@
static void
bstp_update_roles(struct bstp_state *bs, struct bstp_port *bp)
{
+ NET_EPOCH_ASSERT();
+
switch (bp->bp_role) {
case BSTP_ROLE_DISABLED:
/* Clear any flags if set */
@@ -1862,6 +1867,7 @@
static void
bstp_tick(void *arg)
{
+ struct epoch_tracker et;
struct bstp_state *bs = arg;
struct bstp_port *bp;
@@ -1870,6 +1876,7 @@
if (bs->bs_running == 0)
return;
+ NET_EPOCH_ENTER(et);
CURVNET_SET(bs->bs_vnet);
/* poll link events on interfaces that do not support linkstate */
@@ -1908,6 +1915,7 @@
}
CURVNET_RESTORE();
+ NET_EPOCH_EXIT(et);
callout_reset(&bs->bs_bstpcallout, hz, bstp_tick, bs);
}
@@ -2229,6 +2237,7 @@
struct ifnet *ifp = bp->bp_ifp;
KASSERT(bp->bp_active == 0, ("already a bstp member"));
+ NET_EPOCH_ASSERT(); /* Because bstp_update_roles() causes traffic. */
switch (ifp->if_type) {
case IFT_ETHER: /* These can do spanning tree. */
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -1326,6 +1326,7 @@
static int
bridge_ioctl_sifflags(struct bridge_softc *sc, void *arg)
{
+ struct epoch_tracker et;
struct ifbreq *req = arg;
struct bridge_iflist *bif;
struct bstp_port *bp;
@@ -1340,11 +1341,15 @@
/* SPAN is readonly */
return (EINVAL);
+ NET_EPOCH_ENTER(et);
+
if (req->ifbr_ifsflags & IFBIF_STP) {
if ((bif->bif_flags & IFBIF_STP) == 0) {
error = bstp_enable(&bif->bif_stp);
- if (error)
+ if (error) {
+ NET_EPOCH_EXIT(et);
return (error);
+ }
}
} else {
if ((bif->bif_flags & IFBIF_STP) != 0)
@@ -1360,6 +1365,8 @@
/* Save the bits relating to the bridge */
bif->bif_flags = req->ifbr_ifsflags & IFBIFMASK;
+ NET_EPOCH_EXIT(et);
+
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 7:55 AM (13 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15740860
Default Alt Text
D28858.diff (2 KB)
Attached To
Mode
D28858: bridge/stp: Ensure we enter NET_EPOCH whenever we can send traffic
Attached
Detach File
Event Timeline
Log In to Comment