From owner-freebsd-current@FreeBSD.ORG Sun Feb 15 05:54:55 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D75BD16A4CE for ; Sun, 15 Feb 2004 05:54:55 -0800 (PST) Received: from ftp.bjpu.edu.cn (ftp.bjpu.edu.cn [202.112.78.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B49343D1D for ; Sun, 15 Feb 2004 05:54:55 -0800 (PST) (envelope-from junsu@delphij.net) Received: from localhost (localhost [127.0.0.1]) by ftp.bjpu.edu.cn (Postfix) with ESMTP id 1BD2C535A for ; Sun, 15 Feb 2004 21:54:52 +0800 (CST) Received: from ftp.bjpu.edu.cn ([127.0.0.1]) by localhost (ftp.bjpu.edu.cn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 18388-08 for ; Sun, 15 Feb 2004 21:54:51 +0800 (CST) Received: from beastie.frontfree.net (beastie.frontfree.net [218.107.145.7]) by ftp.bjpu.edu.cn (Postfix) with ESMTP id B22A852A3 for ; Sun, 15 Feb 2004 21:54:50 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by beastie.frontfree.net (Postfix) with ESMTP id 4E31D115AF for ; Sun, 15 Feb 2004 21:54:50 +0800 (CST) Received: from beastie.frontfree.net ([127.0.0.1]) by localhost (beastie.frontfree.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01110-02 for ; Sun, 15 Feb 2004 21:54:42 +0800 (CST) Received: from shasujunmv (unknown [211.161.222.37]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by beastie.frontfree.net (Postfix) with ESMTP id 70E1511467 for ; Sun, 15 Feb 2004 21:54:40 +0800 (CST) Message-ID: <008201c3f3cb$41c8dfa0$25dea1d3@shasujunmv> From: "Jun Su" To: Date: Sun, 15 Feb 2004 21:54:35 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at frontfree.net X-Virus-Scanned: by amavisd-new at frontfree.net Subject: syscall module unload problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2004 13:54:55 -0000 Hi All, We use SYSCALL_MODULE to declare a syscall. It results that we have multi modules in one kmod file. For example, aio.ko has 10 modules. When I run kldunload aio, the syscall modules will successfully unloaded. However the aio module can not be unload. Then the aio subsystem enters into an strange state. We can not use aio syscall anymore since the syscall modules are unloaded. And we also can not load the module again since the aio module is still there. The modules that use SYSCALL_MODULE_HELPER have the similar problem. Is this by design? Or this needs some improvement. I want to do some research about this. Thanks, -jun Repro Steps: #kldload aio #kldstat -v -n aio 3 1 0xc1925000 7000 aio.ko Contains modules: Id Name 93 aio_return 94 aio_suspend 95 aio_cancel 96 aio_error 97 aio_read 98 aio_write 99 aio_waitcomplete 100 lio_listio 101 aio #kldunload aio kldunload: can't unload file: Operation not supported #./aiotest Bad System Call #kldstat -v -n aio Id Refs Address Size Name 3 1 0xc1925000 7000 aio.ko Contains modules: Id Name 101 aio #kldload aio kldload: can't load aio: File exists