[RFC] How to unload a kernel module that is in use?

I see, interesting proposition.

So, in your world when being asked a question, say by a stranger asking for direction, the inquirer is supposed to qualify the relevance of the question or else being ignored?

It depends, if the question is, "where is street X" the relevance is obvious enough for me to answer, if the question is where is the "thermal exhaust port" I would be more reluctant to answer depending on the circumstances, or rather I would ask for the why.
Do you always answer all questions directly without inquiring about the underlaying motivation for the question to be posed in the first place?

Mostly yes, because where I come from that is considered polite custom and responses can always be constructed in a way that avoids answering, simple "I dunno" often does.

Let us agree on disagreeing as to whether the topic's question (now labelled RFC) merited a (superfluous discussion about) qualification/justification of its relevance since it was not about any problem solving from the start but simply about clarification.

I may have not indeed.

modprobe -r is not implemented in OpenWrt's ubox (the multicall executable disguising as modprobe, insmod and rmmod - among others).

The rmmod command is available, but not an equivalent replacement to modprobe -r since modprobe -r recurses the modules depending on the one to be unloaded depth-first, and attempts to unload them first in order to allow unloading the requested module itself.

From experience I can tell that rmmod works as expected though when you take care of unloading the unused modules depending on the one you want to unload first.

2 Likes

Thank you for the input/clarification. without modprobe -r it is a bit cumbersome to track down the dependency tree (via modinfo) and tricky to get the head around which one to start unloading.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.