Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern When "loading" a built-in module needs to autoload ...
details: https://anonhg.NetBSD.org/src/rev/002758a64390
branches: trunk
changeset: 769688:002758a64390
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Mon Sep 19 00:40:22 2011 +0000
description:
When "loading" a built-in module needs to autoload a dependant module
which is not already loaded (or was loaded, and then unloaded), make
sure we return a pointer to the built-in module. Otherwise, when the
initial module tries to update its dependancies' reference counts, we
trigger a KASSERT in module_enqueue().
diffstat:
sys/kern/kern_module.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 3d70208ceb67 -r 002758a64390 sys/kern/kern_module.c
--- a/sys/kern/kern_module.c Mon Sep 19 00:23:14 2011 +0000
+++ b/sys/kern/kern_module.c Mon Sep 19 00:40:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_module.c,v 1.81 2011/09/14 12:29:22 christos Exp $ */
+/* $NetBSD: kern_module.c,v 1.82 2011/09/19 00:40:22 pgoyette Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.81 2011/09/14 12:29:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.82 2011/09/19 00:40:22 pgoyette Exp $");
#define _MODULE_INTERNAL
@@ -872,7 +872,7 @@
depth--;
return EPERM;
} else {
- error = module_do_builtin(name, NULL, props);
+ error = module_do_builtin(name, modp, props);
depth--;
return error;
}
@@ -1169,6 +1169,7 @@
}
module_gen++;
+ module_print("unloaded module `%s'", name);
return 0;
}
Home |
Main Index |
Thread Index |
Old Index