Source-Changes-HG archive

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

[src/trunk]: src/sys/net If the unit being closed was a "zombie" (ie, the int...



details:   https://anonhg.NetBSD.org/src/rev/089758a2b641
branches:  trunk
changeset: 997740:089758a2b641
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Mon Mar 25 00:55:28 2019 +0000

description:
If the unit being closed was a "zombie" (ie, the interface was destroyed
previously), remove it from the zombie list after freeing all of its
resources.

This should allow the module to be unloaded even if there was a zombie
at some point.  Without this change, the zombie list never gets emptied.

diffstat:

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

diffs (26 lines):

diff -r a5eaa93e7f13 -r 089758a2b641 sys/net/if_tun.c
--- a/sys/net/if_tun.c  Sun Mar 24 16:42:49 2019 +0000
+++ b/sys/net/if_tun.c  Mon Mar 25 00:55:28 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tun.c,v 1.147 2018/09/03 16:29:35 riastradh Exp $   */
+/*     $NetBSD: if_tun.c,v 1.148 2019/03/25 00:55:28 pgoyette Exp $    */
 
 /*
  * Copyright (c) 1988, Julian Onions <jpo%cs.nott.ac.uk@localhost>
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.147 2018/09/03 16:29:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.148 2019/03/25 00:55:28 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -370,6 +370,7 @@
                softint_disestablish(tp->tun_isih);
                mutex_destroy(&tp->tun_lock);
                kmem_free(tp, sizeof(*tp));
+               LIST_REMOVE(tp, tunz_list);
                return 0;
        }
 



Home | Main Index | Thread Index | Old Index