Current status and possible improvements in CONFIG_MODULE_FORCE_UNLOAD

From: Aditya Garg
Date: Thu Jun 06 2024 - 02:50:16 EST


Hi

I am Aditya Garg. I often require using out of tree drivers to support various hardwares on Linux. Sometimes the provider doesn't write good drivers, and often they have to be force unloaded. It's a common thing in proprietary drivers. I know the author of the driver should take note of the issues, but still the force unloading of the modules does come in handy many times.

Unfortunately if CONFIG_MODULE_FORCE_UNLOAD is not enabled in your kernel, which most probably is not enabled if you are using a Distribution pre compiled kernel, you have to recompile the whole kernel again.

I want wondering if instead of a kernel config option, we could use a kernel parameter to enable/disable this feature, I believe it should act as a better alternative. After all there must be people like me who are forced to recompile the whole linux kernel just for the sake of getting a functionality.

I hope for a reply and suggestions

Regards
Aditya