Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet pserialize_perform() is required an additionally...



details:   https://anonhg.NetBSD.org/src/rev/9c59f31e9d56
branches:  trunk
changeset: 819980:9c59f31e9d56
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Mon Dec 26 00:30:07 2016 +0000

description:
pserialize_perform() is required an additionally serialization. see pserialize(9).

ok by ozaki-r@n.o.

diffstat:

 sys/netinet/in.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (43 lines):

diff -r a555f0f0062c -r 9c59f31e9d56 sys/netinet/in.c
--- a/sys/netinet/in.c  Mon Dec 26 00:11:14 2016 +0000
+++ b/sys/netinet/in.c  Mon Dec 26 00:30:07 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in.c,v 1.191 2016/12/12 03:55:57 ozaki-r Exp $ */
+/*     $NetBSD: in.c,v 1.192 2016/12/26 00:30:07 knakahara Exp $       */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.191 2016/12/12 03:55:57 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.192 2016/12/26 00:30:07 knakahara Exp $");
 
 #include "arp.h"
 
@@ -831,11 +831,10 @@
        TAILQ_REMOVE(&in_ifaddrhead, ia, ia_list);
        IN_ADDRLIST_WRITER_REMOVE(ia);
        ifa_remove(ifp, &ia->ia_ifa);
-       mutex_exit(&in_ifaddr_lock);
-
 #ifdef NET_MPSAFE
        pserialize_perform(in_ifaddrhash_psz);
 #endif
+       mutex_exit(&in_ifaddr_lock);
        IN_ADDRHASH_ENTRY_DESTROY(ia);
        IN_ADDRLIST_ENTRY_DESTROY(ia);
        ifafree(&ia->ia_ifa);
@@ -879,10 +878,10 @@
 
        mutex_enter(&in_ifaddr_lock);
        in_addrhash_remove_locked(ia);
-       mutex_exit(&in_ifaddr_lock);
 #ifdef NET_MPSAFE
        pserialize_perform(in_ifaddrhash_psz);
 #endif
+       mutex_exit(&in_ifaddr_lock);
        IN_ADDRHASH_ENTRY_DESTROY(ia);
 }
 



Home | Main Index | Thread Index | Old Index