Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 Don't call pfxlist_onlink_check with holding ll...
details: https://anonhg.NetBSD.org/src/rev/b4d640a8ad4a
branches: trunk
changeset: 344652:b4d640a8ad4a
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Sun Apr 10 08:15:52 2016 +0000
description:
Don't call pfxlist_onlink_check with holding llentry lock
Sync nd6_free with FreeBSD (as of 2016-04-10).
Should fix PR kern/51056.
diffstat:
sys/netinet6/nd6.c | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)
diffs (54 lines):
diff -r 411c01ffa0e5 -r b4d640a8ad4a sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c Sat Apr 09 19:55:33 2016 +0000
+++ b/sys/netinet6/nd6.c Sun Apr 10 08:15:52 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nd6.c,v 1.189 2016/04/04 12:05:40 roy Exp $ */
+/* $NetBSD: nd6.c,v 1.190 2016/04/10 08:15:52 ozaki-r Exp $ */
/* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.189 2016/04/04 12:05:40 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.190 2016/04/10 08:15:52 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -1145,6 +1145,15 @@
if (ln->ln_router || dr) {
/*
+ * We need to unlock to avoid a LOR with rt6_flush()
+ * with the rnh and for the calls to
+ * pfxlist_onlink_check() and defrouter_select() in the
+ * block further down for calls into nd6_lookup().
+ * We still hold a ref.
+ */
+ LLE_WUNLOCK(ln);
+
+ /*
* rt6_flush must be called whether or not the neighbor
* is in the Default Router List.
* See a corresponding comment in nd6_na_input().
@@ -1181,6 +1190,19 @@
*/
defrouter_select();
}
+
+#ifdef __FreeBSD__
+ /*
+ * If this entry was added by an on-link redirect, remove the
+ * corresponding host route.
+ */
+ if (ln->la_flags & LLE_REDIRECT)
+ nd6_free_redirect(ln);
+#endif
+
+ if (ln->ln_router || dr)
+ LLE_WLOCK(ln);
+
splx(s);
}
Home |
Main Index |
Thread Index |
Old Index