Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/netinet6 Pull up following revision(s) (requested by ...
details: https://anonhg.NetBSD.org/src/rev/077ab1f82a41
branches: netbsd-8
changeset: 435199:077ab1f82a41
user: martin <martin%NetBSD.org@localhost>
date: Wed Aug 15 12:09:58 2018 +0000
description:
Pull up following revision(s) (requested by ozaki-r in ticket #975):
sys/netinet6/nd6_rtr.c: revision 1.144
Don't call find_pfxlist_reachable_router, which may sleep, in a
pserialize read section
Found by knakahara@
diffstat:
sys/netinet6/nd6_rtr.c | 25 ++++++++++++++++---------
1 files changed, 16 insertions(+), 9 deletions(-)
diffs (82 lines):
diff -r dbc9525ee4a5 -r 077ab1f82a41 sys/netinet6/nd6_rtr.c
--- a/sys/netinet6/nd6_rtr.c Wed Aug 15 12:07:30 2018 +0000
+++ b/sys/netinet6/nd6_rtr.c Wed Aug 15 12:09:58 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nd6_rtr.c,v 1.135.6.3 2018/05/22 17:41:12 martin Exp $ */
+/* $NetBSD: nd6_rtr.c,v 1.135.6.4 2018/08/15 12:09:58 martin Exp $ */
/* $KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.135.6.3 2018/05/22 17:41:12 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.135.6.4 2018/08/15 12:09:58 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -1603,6 +1603,7 @@
}
}
+ int bound = curlwp_bind();
/*
* Changes on the prefix status might affect address status as well.
* Make sure that all addresses derived from an attached prefix are
@@ -1613,6 +1614,9 @@
*/
s = pserialize_read_enter();
IN6_ADDRLIST_READER_FOREACH(ia) {
+ struct psref psref;
+ bool found;
+
if (!(ia->ia6_flags & IN6_IFF_AUTOCONF))
continue;
@@ -1625,14 +1629,19 @@
continue;
}
- if (find_pfxlist_reachable_router(ia->ia6_ndpr))
+ ia6_acquire(ia, &psref);
+ pserialize_read_exit(s);
+
+ found = find_pfxlist_reachable_router(ia->ia6_ndpr) != NULL;
+
+ s = pserialize_read_enter();
+ ia6_release(ia, &psref);
+ if (found)
break;
}
pserialize_read_exit(s);
if (ia) {
- int bound = curlwp_bind();
-
s = pserialize_read_enter();
IN6_ADDRLIST_READER_FOREACH(ia) {
struct ifaddr *ifa = (struct ifaddr *)ia;
@@ -1669,11 +1678,8 @@
ia6_release(ia, &psref);
}
pserialize_read_exit(s);
- curlwp_bindx(bound);
}
else {
- int bound = curlwp_bind();
-
s = pserialize_read_enter();
IN6_ADDRLIST_READER_FOREACH(ia) {
if ((ia->ia6_flags & IN6_IFF_AUTOCONF) == 0)
@@ -1697,8 +1703,9 @@
}
}
pserialize_read_exit(s);
- curlwp_bindx(bound);
}
+
+ curlwp_bindx(bound);
}
static int
Home |
Main Index |
Thread Index |
Old Index