Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jan 2025 15:10:52 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 38fdcca05d09 - main - netinet: enter epoch in garp_rexmit()
Message-ID:  <202501201510.50KFAqfU073428@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=38fdcca05d09b4d5426a253d3c484f9481a73ac2

commit 38fdcca05d09b4d5426a253d3c484f9481a73ac2
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2025-01-20 13:24:48 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2025-01-20 13:28:39 +0000

    netinet: enter epoch in garp_rexmit()
    
    garp_rexmit() is a callback, so is not in net_epoch, which
    arprequest_internal() expects.
    Enter and exit the net_epoch.
    
    PR:             284073
    MFC after:      1 week
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/netinet/if_ether.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 502261f5f2d9..88da1b139b1f 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -1353,6 +1353,7 @@ sysctl_garp_rexmit(SYSCTL_HANDLER_ARGS)
 static void
 garp_rexmit(void *arg)
 {
+	struct epoch_tracker et;
 	struct in_ifaddr *ia = arg;
 
 	if (callout_pending(&ia->ia_garp_timer) ||
@@ -1362,6 +1363,7 @@ garp_rexmit(void *arg)
 		return;
 	}
 
+	NET_EPOCH_ENTER(et);
 	CURVNET_SET(ia->ia_ifa.ifa_ifp->if_vnet);
 
 	/*
@@ -1393,6 +1395,7 @@ garp_rexmit(void *arg)
 	}
 
 	CURVNET_RESTORE();
+	NET_EPOCH_EXIT(et);
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501201510.50KFAqfU073428>