Module Name: src Committed By: dyoung Date: Wed Nov 16 06:09:37 UTC 2011
Modified Files: src/sys/net: if.c Log Message: Before freeing an ifnet_lock, destroy its mutex. Should help with kern/43294. To generate a diff of this commit: cvs rdiff -u -r1.256 -r1.257 src/sys/net/if.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.c diff -u src/sys/net/if.c:1.256 src/sys/net/if.c:1.257 --- src/sys/net/if.c:1.256 Fri Oct 28 20:11:58 2011 +++ src/sys/net/if.c Wed Nov 16 06:09:37 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.256 2011/10/28 20:11:58 dyoung Exp $ */ +/* $NetBSD: if.c,v 1.257 2011/11/16 06:09:37 dyoung 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.256 2011/10/28 20:11:58 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.257 2011/11/16 06:09:37 dyoung Exp $"); #include "opt_inet.h" @@ -1954,6 +1954,7 @@ ifioctl_detach(struct ifnet *ifp) ifp->if_ioctl_lock = NULL; percpu_free(il->il_nenter, sizeof(uint64_t)); il->il_nenter = NULL; + mutex_destroy(&il->il_lock); kmem_free(il, sizeof(*il)); }