delete_module(2) System Calls Manual delete_module(2) delete_module - (libc -lc) #include /* O_* */ #include /* SYS_* */ #include int syscall(SYS_delete_module, const char *name, unsigned int flags); : glibc delete_module() syscall(2). delete_module() name. exit . flags . . : (1) ( ) . (2) ( ) . (3) flags. ( ) O_NONBLOCK O_TRUNC . flags : flags == O_NONBLOCK . flags == (O_NONBLOCK | O_TRUNC) . (flags & O_NONBLOCK) == 0 flags O_NONBLOCK : o . o (TASK_UNINTERRUPTIBLE) . o . O_TRUNC . init exit . O_TRUNC . O_TRUNC ! CONFIG_MODULE_FORCE_UNLOAD . ( CONFIG_MODULE_FORCE_UNLOAD .) (TAINT_FORCED_RMMOD). . -1 errno . EBUSY "" ( ) init exit O_TRUNC flags. EFAULT name . ENOENT . EPERM ( CAP_SYS_MODULE) ( /proc/sys/kernel/modules_disabled proc(5)). EWOULDBLOCK O_NONBLOCK flags O_TRUNC flags. . delete_module() glibc. glibc glibc glibc 2.23 ABI . ( glibc 2.23) syscall(2). 2.4 Linux 2.4 : int delete_module(const char *name); name (NULL) . delete_module() 2.4 . O_NONBLOCK flags . 3.7 O_NONBLOCK . create_module(2) init_module(2) query_module(2) lsmod(8) modprobe(8) rmmod(8) 3 . . : . 6.18 8 2026 delete_module(2)