diff options
author | jhb <jhb@FreeBSD.org> | 2006-08-01 16:32:20 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-08-01 16:32:20 +0000 |
commit | 023ecadf48622b9accaf88dd47b13cd8a99ae035 (patch) | |
tree | b9ddf54c00e1c5c2b880e5c041c164917b3311e2 /sys/sys/sysent.h | |
parent | 4dc640e56e164af7bfa43acfe36b6a8037512f66 (diff) | |
download | FreeBSD-src-023ecadf48622b9accaf88dd47b13cd8a99ae035.zip FreeBSD-src-023ecadf48622b9accaf88dd47b13cd8a99ae035.tar.gz |
Make system call modules a bit more robust:
- If we fail to register the system call during MOD_LOAD, then note that
so that we don't try to deregister it or invoke the chained event handler
during the subsequent MOD_UNLOAD event. Doing the deregister when the
register failed could result in trashing system call entries.
- Add a SI_SUB_SYSCALLS just before starting up init and use that to
register syscall modules instead of SI_SUB_DRIVERS. Registering system
calls as late as possible increases the chances that any other module
event handlers or SYSINITs in a module are executed to initialize the
data in a kld before a syscall dependent on that data is able to be
invoked.
MFC after: 3 days
Diffstat (limited to 'sys/sys/sysent.h')
-rw-r--r-- | sys/sys/sysent.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index 0566794..4e4f25e 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -113,7 +113,7 @@ static moduledata_t name##_mod = { \ syscall_module_handler, \ &name##_syscall_mod \ }; \ -DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE) +DECLARE_MODULE(name, name##_mod, SI_SUB_SYSCALLS, SI_ORDER_MIDDLE) #define SYSCALL_MODULE_HELPER(syscallname) \ static int syscallname##_syscall = SYS_##syscallname; \ |