git: 75c0e1a8e073 - stable/13 - nd6: Mark several callouts as MPSAFE
Mark Johnston
markj at FreeBSD.org
Mon Aug 16 13:02:24 UTC 2021
The branch stable/13 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=75c0e1a8e073f1d5a89b863c84f4db3ccd042b64
commit 75c0e1a8e073f1d5a89b863c84f4db3ccd042b64
Author: Mark Johnston <markj at FreeBSD.org>
AuthorDate: 2021-08-09 17:21:43 +0000
Commit: Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-08-16 13:01:11 +0000
nd6: Mark several callouts as MPSAFE
The use of Giant here is vestigal and does not provide any useful
synchronization. Furthermore, non-MPSAFE callouts can cause the
softclock threads to block waiting for long-running newbus operations to
complete.
Reported by: mav
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 663428ea17e3a81f4c514d2571b90a13c065b1e8)
---
sys/netinet6/in6_ifattach.c | 2 +-
sys/netinet6/nd6.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c
index 02d6a2b230b4..8d027e2fb1d9 100644
--- a/sys/netinet6/in6_ifattach.c
+++ b/sys/netinet6/in6_ifattach.c
@@ -887,7 +887,7 @@ in6_ifattach_init(void *dummy)
{
/* Timer for regeneranation of temporary addresses randomize ID. */
- callout_init(&V_in6_tmpaddrtimer_ch, 0);
+ callout_init(&V_in6_tmpaddrtimer_ch, 1);
callout_reset(&V_in6_tmpaddrtimer_ch,
(V_ip6_temp_preferred_lifetime - V_ip6_desync_factor -
V_ip6_temp_regen_advance) * hz,
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 62f0ac733a23..8dc5495d3ad9 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -225,11 +225,11 @@ nd6_init(void)
nd6_defrouter_init();
/* Start timers. */
- callout_init(&V_nd6_slowtimo_ch, 0);
+ callout_init(&V_nd6_slowtimo_ch, 1);
callout_reset(&V_nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz,
nd6_slowtimo, curvnet);
- callout_init(&V_nd6_timer_ch, 0);
+ callout_init(&V_nd6_timer_ch, 1);
callout_reset(&V_nd6_timer_ch, hz, nd6_timer, curvnet);
nd6_dad_init();
More information about the dev-commits-src-all
mailing list