syscall module unload problem

From: Jun Su <junsu_at_delphij.net>
Date: Sun, 15 Feb 2004 21:54:35 +0800
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
Received on Sun Feb 15 2004 - 04:54:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:43 UTC