Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Restore softnet_lock and KERNEL_LOCK for rtreque...
details: https://anonhg.NetBSD.org/src/rev/fa207304cfd7
branches: trunk
changeset: 341707:fa207304cfd7
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Thu Nov 19 03:03:04 2015 +0000
description:
Restore softnet_lock and KERNEL_LOCK for rtrequest and rtfree
We still need them for rt operations.
diffstat:
sys/netinet/if_arp.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 178f5e2dedd4 -r fa207304cfd7 sys/netinet/if_arp.c
--- a/sys/netinet/if_arp.c Thu Nov 19 03:02:10 2015 +0000
+++ b/sys/netinet/if_arp.c Thu Nov 19 03:03:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_arp.c,v 1.193 2015/11/06 08:55:49 ozaki-r Exp $ */
+/* $NetBSD: if_arp.c,v 1.194 2015/11/19 03:03:04 ozaki-r Exp $ */
/*-
* Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.193 2015/11/06 08:55:49 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.194 2015/11/19 03:03:04 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -1443,8 +1443,15 @@
static void arptfree(struct rtentry *rt)
{
+ /* We still need to hold the locks */
+ mutex_enter(softnet_lock);
+ KERNEL_LOCK(1, NULL);
+
rtrequest(RTM_DELETE, rt_getkey(rt), NULL, rt_mask(rt), 0, NULL);
rtfree(rt);
+
+ KERNEL_UNLOCK_ONE(NULL);
+ mutex_exit(softnet_lock);
}
/*
Home |
Main Index |
Thread Index |
Old Index