Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/net Apply patch, requested by sborrill in ticket #1680:
details: https://anonhg.NetBSD.org/src/rev/57f49659166b
branches: netbsd-7
changeset: 800625:57f49659166b
user: martin <martin%NetBSD.org@localhost>
date: Sat Feb 23 07:17:37 2019 +0000
description:
Apply patch, requested by sborrill in ticket #1680:
sys/net/rtsock.c (apply patch)
Fix locking for sysctl_rtable (fix in HEAD will be different).
diffstat:
sys/net/rtsock.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r b287643c807e -r 57f49659166b sys/net/rtsock.c
--- a/sys/net/rtsock.c Sat Feb 23 07:02:20 2019 +0000
+++ b/sys/net/rtsock.c Sat Feb 23 07:17:37 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtsock.c,v 1.163.2.1 2018/11/28 16:30:06 martin Exp $ */
+/* $NetBSD: rtsock.c,v 1.163.2.2 2019/02/23 07:17:37 martin Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.163.2.1 2018/11/28 16:30:06 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.163.2.2 2019/02/23 07:17:37 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1408,6 +1408,8 @@
w.w_needed = 0 - w.w_given;
w.w_where = where;
+ mutex_enter(softnet_lock);
+ KERNEL_LOCK(1, NULL);
s = splsoftnet();
switch (w.w_op) {
@@ -1434,6 +1436,8 @@
break;
}
splx(s);
+ KERNEL_UNLOCK_ONE(NULL);
+ mutex_exit(softnet_lock);
/* check to see if we couldn't allocate memory with NOWAIT */
if (error == ENOBUFS && w.w_tmem == 0 && w.w_tmemneeded)
Home |
Main Index |
Thread Index |
Old Index