Source-Changes-HG archive

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

[src/trunk]: src/sys/net Fix a bug that tries to psref_acquire ifa with a psr...



details:   https://anonhg.NetBSD.org/src/rev/4eda4b857d80
branches:  trunk
changeset: 358145:4eda4b857d80
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Thu Dec 14 05:48:59 2017 +0000

description:
Fix a bug that tries to psref_acquire ifa with a psref used before

This fixes ATF tests that started to fail by a recent change to psref.

diffstat:

 sys/net/rtsock.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 84867b70d82e -r 4eda4b857d80 sys/net/rtsock.c
--- a/sys/net/rtsock.c  Thu Dec 14 05:47:45 2017 +0000
+++ b/sys/net/rtsock.c  Thu Dec 14 05:48:59 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtsock.c,v 1.233 2017/12/14 05:47:45 ozaki-r Exp $     */
+/*     $NetBSD: rtsock.c,v 1.234 2017/12/14 05:48:59 ozaki-r 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.233 2017/12/14 05:47:45 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.234 2017/12/14 05:48:59 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -622,6 +622,7 @@
                if (info.rti_info[RTAX_IFA] == NULL &&
                    info.rti_info[RTAX_GATEWAY] == NULL)
                        goto next;
+               ifa_release(ifa, psref);
                if (info.rti_info[RTAX_IFA] == NULL) {
                        /* route change <dst> <gw> -ifp <if> */
                        ifa = ifaof_ifpforaddr_psref(info.rti_info[RTAX_GATEWAY],



Home | Main Index | Thread Index | Old Index