Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178011669
D62077.1795756083.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
729 B
Referenced Files
None
Subscribers
None
D62077.1795756083.diff
View Options
diff --git a/sys/net/if.c b/sys/net/if.c
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1472,23 +1472,26 @@
/*
* XXX: This KPI should not expose ifg_group. therefore the current
* implementation is questionable and may change in the future.
+ *
+ * The callback runs in the network epoch and must not sleep.
*/
int
if_foreach_group(struct ifnet *ifp, if_foreach_group_cb_t cb, void *cb_arg)
{
+ struct epoch_tracker et;
struct ifg_list *ifgl;
int error;
MPASS(cb);
error = 0;
- IFNET_RLOCK();
+ NET_EPOCH_ENTER(et);
CK_STAILQ_FOREACH(ifgl, &ifp->if_groups, ifgl_next) {
error = cb(ifgl->ifgl_group, cb_arg);
if (error != 0)
break;
}
- IFNET_RUNLOCK();
+ NET_EPOCH_EXIT(et);
return (error);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 27, 5:08 AM (22 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42033477
Default Alt Text
D62077.1795756083.diff (729 B)
Attached To
Mode
D62077: ifnet: Walk interface groups in the net epoch
Attached
Detach File
Event Timeline