Module Name: src Committed By: haad Date: Tue Mar 24 22:05:24 UTC 2009
Modified Files: src/sys/fs/ptyfs: ptyfs_subr.c Log Message: Destroy mutexes used to guard hash table during vfs_detach. Fixes LOCKDEBUG panic when ptyfs module is unloaded. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/fs/ptyfs/ptyfs_subr.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/fs/ptyfs/ptyfs_subr.c diff -u src/sys/fs/ptyfs/ptyfs_subr.c:1.17 src/sys/fs/ptyfs/ptyfs_subr.c:1.18 --- src/sys/fs/ptyfs/ptyfs_subr.c:1.17 Wed Dec 17 20:51:35 2008 +++ src/sys/fs/ptyfs/ptyfs_subr.c Tue Mar 24 22:05:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ptyfs_subr.c,v 1.17 2008/12/17 20:51:35 cegger Exp $ */ +/* $NetBSD: ptyfs_subr.c,v 1.18 2009/03/24 22:05:24 haad Exp $ */ /* * Copyright (c) 1993 @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ptyfs_subr.c,v 1.17 2008/12/17 20:51:35 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ptyfs_subr.c,v 1.18 2009/03/24 22:05:24 haad Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -313,7 +313,10 @@ void ptyfs_hashdone(void) { - + + mutex_destroy(&ptyfs_hashlock); + mutex_destroy(&ptyfs_used_slock); + mutex_destroy(&ptyfs_free_slock); hashdone(ptyfs_used_tbl, HASH_LIST, ptyfs_used_mask); hashdone(ptyfs_free_tbl, HASH_LIST, ptyfs_free_mask); }