My loadable module registers its protocol family and creates sockets. I provide protocol operations, bind(), release(), and mmap (). The mmap handler uses remap_vmalloc_range to share a common vmallocation between users. It works.

I want to be able to shut down cleanly, for system shutdown, module unload, and other emergency events like device unregistration. I don't know how to shut down my vmallocation, which ought ultimately to be vfreed.

If there are users vmapped when I want to vfree, what do I do?

Can I vfree it anyway and expect the users to be unmapped for free? Or do i have to do some kind of munmap() of all the users, first?

During system shutdown and module unload in particular, it seems that by the time the __exit routine is called all users are supposded to be gone and all sockets (hence all vmaps) released. In this situation at least, can I just vfree safely?

For any help, thanks,
A Malton

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to