Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/net Pull up following revision(s) (requested by riast...
details: https://anonhg.NetBSD.org/src/rev/7685e84613fe
branches: netbsd-8
changeset: 373635:7685e84613fe
user: martin <martin%NetBSD.org@localhost>
date: Wed Feb 22 18:55:06 2023 +0000
description:
Pull up following revision(s) (requested by riastradh in ticket #1801):
sys/net/route.c: revision 1.236
route(4): Work around deadlock in rt_free wait path.
PR kern/56844
diffstat:
sys/net/route.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diffs (37 lines):
diff -r f13348edb638 -r 7685e84613fe sys/net/route.c
--- a/sys/net/route.c Wed Feb 22 18:50:41 2023 +0000
+++ b/sys/net/route.c Wed Feb 22 18:55:06 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: route.c,v 1.194.6.15 2019/10/04 11:26:35 martin Exp $ */
+/* $NetBSD: route.c,v 1.194.6.16 2023/02/22 18:55:06 martin Exp $ */
/*-
* Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.194.6.15 2019/10/04 11:26:35 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.194.6.16 2023/02/22 18:55:06 martin Exp $");
#include <sys/param.h>
#ifdef RTFLUSH_DEBUG
@@ -644,8 +644,17 @@
rt_wait_ok(void)
{
+ /*
+ * This originally returned !cpu_softintr_p(), but that doesn't
+ * work: the caller may hold a lock (probably softnet lock)
+ * that a softint is waiting for, in which case waiting here
+ * would cause a deadlock. See https://gnats.netbsd.org/56844
+ * for details. For now, until the locking paths are sorted
+ * out, we just disable the waiting option altogether and
+ * always defer to workqueue.
+ */
KASSERT(!cpu_intr_p());
- return !cpu_softintr_p();
+ return false;
}
void
Home |
Main Index |
Thread Index |
Old Index