Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Fix the position of IFADDR_ENTRY_DESTROY
details: https://anonhg.NetBSD.org/src/rev/22995c082d3a
branches: trunk
changeset: 348594:22995c082d3a
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Fri Oct 28 05:52:05 2016 +0000
description:
Fix the position of IFADDR_ENTRY_DESTROY
It must be called after all readers left, i.e, after pserialize_perform.
diffstat:
sys/net/if.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r 084c57621178 -r 22995c082d3a sys/net/if.c
--- a/sys/net/if.c Fri Oct 28 05:50:18 2016 +0000
+++ b/sys/net/if.c Fri Oct 28 05:52:05 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.359 2016/10/18 07:30:30 ozaki-r Exp $ */
+/* $NetBSD: if.c,v 1.360 2016/10/28 05:52:05 ozaki-r Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.359 2016/10/18 07:30:30 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.360 2016/10/28 05:52:05 ozaki-r Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -1621,7 +1621,6 @@
IFNET_LOCK();
TAILQ_REMOVE(&ifp->if_addrlist, ifa, ifa_list);
IFADDR_WRITER_REMOVE(ifa);
- IFADDR_ENTRY_DESTROY(ifa);
#ifdef NET_MPSAFE
pserialize_perform(ifnet_psz);
#endif
@@ -1630,6 +1629,7 @@
#ifdef NET_MPSAFE
psref_target_destroy(&ifa->ifa_psref, ifa_psref_class);
#endif
+ IFADDR_ENTRY_DESTROY(ifa);
ifafree(ifa);
}
Home |
Main Index |
Thread Index |
Old Index