Module Name: src Committed By: pgoyette Date: Mon Mar 25 00:55:28 UTC 2019
Modified Files: src/sys/net: if_tun.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.147 -r1.148 src/sys/net/if_tun.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/net/if_tun.c diff -u src/sys/net/if_tun.c:1.147 src/sys/net/if_tun.c:1.148 --- src/sys/net/if_tun.c:1.147 Mon Sep 3 16:29:35 2018 +++ src/sys/net/if_tun.c Mon Mar 25 00:55:28 2019 @@ -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 <j...@cs.nott.ac.uk> @@ -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 @@ tunclose(dev_t dev, int flag, int mode, softint_disestablish(tp->tun_isih); mutex_destroy(&tp->tun_lock); kmem_free(tp, sizeof(*tp)); + LIST_REMOVE(tp, tunz_list); return 0; }