Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Save and clear the la route while we have a writ...
details: https://anonhg.NetBSD.org/src/rev/b38993befa2b
branches: trunk
changeset: 341004:b38993befa2b
user: roy <roy%NetBSD.org@localhost>
date: Wed Oct 14 11:17:57 2015 +0000
description:
Save and clear the la route while we have a write lock
diffstat:
sys/netinet/if_arp.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (47 lines):
diff -r 69c7459226fc -r b38993befa2b sys/netinet/if_arp.c
--- a/sys/netinet/if_arp.c Wed Oct 14 08:32:24 2015 +0000
+++ b/sys/netinet/if_arp.c Wed Oct 14 11:17:57 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_arp.c,v 1.187 2015/10/13 12:33:07 roy Exp $ */
+/* $NetBSD: if_arp.c,v 1.188 2015/10/14 11:17:57 roy 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.187 2015/10/13 12:33:07 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.188 2015/10/14 11:17:57 roy Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -315,6 +315,7 @@
{
struct llentry *lle = arg;
struct ifnet *ifp;
+ struct rtentry *rt;
mutex_enter(softnet_lock);
@@ -345,16 +346,17 @@
goto out;
}
ifp = lle->lle_tbl->llt_ifp;
+ rt = lle->la_rt;
+ lle->la_rt = NULL;
callout_stop(&lle->la_timer);
/* XXX: LOR avoidance. We still have ref on lle. */
LLE_WUNLOCK(lle);
- if (lle->la_rt != NULL) {
+ if (rt != NULL) {
/* We have to call arptfree w/o IF_AFDATA_LOCK */
- arptfree(lle->la_rt);
- lle->la_rt = NULL;
+ arptfree(rt);
}
IF_AFDATA_LOCK(ifp);
Home |
Main Index |
Thread Index |
Old Index