From ec1d6a72a32c4ef00dd6a57f57236caf900fcb6e Mon Sep 17 00:00:00 2001 From: glebius Date: Wed, 16 Oct 2019 16:32:58 +0000 Subject: [PATCH] do_link_state_change() is executed in taskqueue context and in general is allowed to sleep. Don't enter the epoch for the whole duration. If some event handlers need the epoch, they should handle that theirselves. Discussed with: hselasky --- sys/net/if.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 7f261633c012..a22eb7ef362b 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -2313,11 +2313,9 @@ if_link_state_change(struct ifnet *ifp, int link_state) static void do_link_state_change(void *arg, int pending) { - struct epoch_tracker et; struct ifnet *ifp; int link_state; - NET_EPOCH_ENTER(et); ifp = arg; link_state = ifp->if_link_state; @@ -2345,7 +2343,6 @@ do_link_state_change(void *arg, int pending) if (log_link_state_change) if_printf(ifp, "link state changed to %s\n", (link_state == LINK_STATE_UP) ? "UP" : "DOWN" ); - NET_EPOCH_EXIT(et); EVENTHANDLER_INVOKE(ifnet_link_event, ifp, link_state); CURVNET_RESTORE(); }