svn commit: r233596 - stable/8/sys/kern

Andrey V. Elsukov ae at FreeBSD.org
Wed Mar 28 06:49:30 UTC 2012


Author: ae
Date: Wed Mar 28 06:49:29 2012
New Revision: 233596
URL: http://svn.freebsd.org/changeset/base/233596

Log:
  MFC r233276:
    Acquire modules lock before call module_getname() in the KLD_DEBUG case.

Modified:
  stable/8/sys/kern/kern_linker.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/kern/kern_linker.c
==============================================================================
--- stable/8/sys/kern/kern_linker.c	Wed Mar 28 06:49:04 2012	(r233595)
+++ stable/8/sys/kern/kern_linker.c	Wed Mar 28 06:49:29 2012	(r233596)
@@ -634,8 +634,12 @@ linker_file_unload(linker_file_t file, i
 		 * Give the module a chance to veto the unload.
 		 */
 		if ((error = module_unload(mod)) != 0) {
+#ifdef KLD_DEBUG
+			MOD_SLOCK;
 			KLD_DPF(FILE, ("linker_file_unload: module %s"
 			    " failed unload\n", module_getname(mod)));
+			MOD_SUNLOCK;
+#endif
 			return (error);
 		}
 		MOD_XLOCK;


More information about the svn-src-stable-8 mailing list