Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 Work around softnet_lock handling
details: https://anonhg.NetBSD.org/src/rev/194e8ffe5bf6
branches: trunk
changeset: 358369:194e8ffe5bf6
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Tue Dec 26 02:26:45 2017 +0000
description:
Work around softnet_lock handling
nd6_dad_stoptimer can be called with or without softnet_lock held.
callout_halt has to take softnet_lock depending on the situation.
diffstat:
sys/netinet6/nd6_nbr.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r 082c437b933f -r 194e8ffe5bf6 sys/netinet6/nd6_nbr.c
--- a/sys/netinet6/nd6_nbr.c Tue Dec 26 02:01:35 2017 +0000
+++ b/sys/netinet6/nd6_nbr.c Tue Dec 26 02:26:45 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nd6_nbr.c,v 1.139 2017/11/17 07:37:12 ozaki-r Exp $ */
+/* $NetBSD: nd6_nbr.c,v 1.140 2017/12/26 02:26:45 ozaki-r Exp $ */
/* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.139 2017/11/17 07:37:12 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.140 2017/12/26 02:26:45 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1097,7 +1097,11 @@
#ifdef NET_MPSAFE
callout_halt(&dp->dad_timer_ch, NULL);
#else
- callout_halt(&dp->dad_timer_ch, softnet_lock);
+ /* XXX still need the trick for softnet_lock */
+ if (mutex_owned(softnet_lock))
+ callout_halt(&dp->dad_timer_ch, softnet_lock);
+ else
+ callout_halt(&dp->dad_timer_ch, NULL);
#endif
}
Home |
Main Index |
Thread Index |
Old Index