module_exit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:


πŸ’‹ mwah! this page comes from ./include/linux, dated October 2026 β€” catch you in the kernel, bestie 🫢

πŸ“¦ where this page comes from