From owner-cvs-all@FreeBSD.ORG Tue Aug 1 16:32:24 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23A5016A4E0; Tue, 1 Aug 2006 16:32:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0F6443D69; Tue, 1 Aug 2006 16:32:20 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k71GWKOC006942; Tue, 1 Aug 2006 16:32:20 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k71GWKMJ006941; Tue, 1 Aug 2006 16:32:20 GMT (envelope-from jhb) Message-Id: <200608011632.k71GWKMJ006941@repoman.freebsd.org> From: John Baldwin Date: Tue, 1 Aug 2006 16:32:20 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/kern kern_syscalls.c src/sys/sys kernel.h sysent.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2006 16:32:24 -0000 jhb 2006-08-01 16:32:20 UTC FreeBSD src repository Modified files: sys/kern kern_syscalls.c sys/sys kernel.h sysent.h Log: 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 Revision Changes Path 1.12 +11 -1 src/sys/kern/kern_syscalls.c 1.131 +1 -0 src/sys/sys/kernel.h 1.49 +1 -1 src/sys/sys/sysent.h