Issue while unloading modules via modprobe

Chetan Nanda chetannanda at gmail.com
Tue Dec 3 03:30:02 EST 2013


Hi,

I am getting an error while unloading modules via modprobe. Here is the
description of issue.

I have a module 'A' that depends on Module 'C' and 'D'.
And another module 'B' that depends on Module 'C' and 'E'

I loaded these modules from code via 'system' function as

error = system("modprobe -v A");
error = system("modprobe -v B");

After this all my modules A, B, C, D, and E are loaded properly.

Now when i tried to unload module A via

error =  system("modprobe -rv A");

This returns an error = 256.

But my module A and D is unloaded successfully. 'C' is not unloaded as it
is still in used by 'B'.
Is the error returned by system function is caused due to not unloading of
module 'C'? This is a valid scenario and error should not have returned in
this case.

I am still trying to find the reason for an error. If anyone has some
information on this then please help to share.

Thanks,
Chetan Nanda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20131203/e8f1d857/attachment.html 


More information about the Kernelnewbies mailing list