module_exit(9)
π module_exit(9) β driver exit entry point π
okay so bestie, welcome to the module_exit(9) page from the Kernel API Manual. This is literally the exit-entry-point lore: it's giving βhow does my driver say bye?β energy. π«Ά
β¨ NAME β¨
module_exit β driver exit entry point
πΈ SYNOPSIS πΈ
module_exit (x );
π ARGUMENTS π
xβ function to be run when driver is removed
π¦ DESCRIPTION π¦
okay so here's the vibe: module_exit will wrap the driver clean-up code with cleanup_module when used with rmmod when the driver is a module. π
If the driver is statically compiled into the kernel, module_exit has no effect. no cap. zero.
There can only be one per module. one. singular. the main character only. π
π SEE ALSO π
Kernel file ./include/linux/module.h β and these besties:
module_init(9)struct klp_modinfo(9)try_module_get(9)module_put(9)
π mwah! this page comes from ./include/linux, dated October 2026 β catch you in the kernel, bestie π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms