Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net route: avoid overwriting rt_free_global.enqueued une...
details: https://anonhg.NetBSD.org/src/rev/6397a420fbb3
branches: trunk
changeset: 993331:6397a420fbb3
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Wed Sep 05 02:49:40 2018 +0000
description:
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 | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 85b3ee0e052a -r 6397a420fbb3 sys/net/route.c
--- a/sys/net/route.c Wed Sep 05 02:49:09 2018 +0000
+++ b/sys/net/route.c Wed Sep 05 02:49:40 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: route.c,v 1.212 2018/09/05 02:49:09 ozaki-r Exp $ */
+/* $NetBSD: route.c,v 1.213 2018/09/05 02:49:40 ozaki-r 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.212 2018/09/05 02:49:09 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.213 2018/09/05 02:49:40 ozaki-r 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;
}
Home |
Main Index |
Thread Index |
Old Index