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 ozaki...
details: https://anonhg.NetBSD.org/src/rev/5ebbd1f8eedc
branches: netbsd-8
changeset: 435248:5ebbd1f8eedc
user: martin <martin%NetBSD.org@localhost>
date: Fri Sep 07 12:31:30 2018 +0000
description:
Pull up following revision(s) (requested by ozaki-r in ticket #1012):
sys/net/route.c: revision 1.212
sys/net/route.c: revision 1.213
route: don't take an extra reference of a rtentry for the delayed free mechanism
Because a reference is already taken at that point.
-
route: avoid overwriting rt_free_global.enqueued unexpectedly
rt_free_global.enqueued can be set to true by rt_free during rt_free_work
because rt_free_work releases rt_free_global.lock. So rt_free_work must update
it once and not update after releasing the lock.
diffstat:
sys/net/route.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r f9634cd396ca -r 5ebbd1f8eedc sys/net/route.c
--- a/sys/net/route.c Fri Sep 07 12:27:26 2018 +0000
+++ b/sys/net/route.c Fri Sep 07 12:31:30 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: route.c,v 1.194.6.10 2018/06/08 10:14:33 martin Exp $ */
+/* $NetBSD: route.c,v 1.194.6.11 2018/09/07 12:31:30 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.10 2018/06/08 10:14:33 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.194.6.11 2018/09/07 12:31:30 martin Exp $");
#include <sys/param.h>
#ifdef RTFLUSH_DEBUG
@@ -702,8 +702,8 @@
struct rtentry *rt;
mutex_enter(&rt_free_global.lock);
- rt_free_global.enqueued = false;
if ((rt = SLIST_FIRST(&rt_free_global.queue)) == NULL) {
+ rt_free_global.enqueued = false;
mutex_exit(&rt_free_global.lock);
return;
}
@@ -726,7 +726,7 @@
}
mutex_enter(&rt_free_global.lock);
- rt_ref(rt);
+ /* No need to add a reference here. */
SLIST_INSERT_HEAD(&rt_free_global.queue, rt, rt_free);
if (!rt_free_global.enqueued) {
workqueue_enqueue(rt_free_global.wq, &rt_free_global.wk, NULL);
Home |
Main Index |
Thread Index |
Old Index