Re: How to unload lksctp kernel module?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/26/2013 10:00 AM, Jon Leighton wrote:
On 2/26/13 9:13 AM, Vlad Yasevich wrote:
On 02/25/2013 05:00 PM, Daniel Borkmann wrote:
(cc: linux-sctp, which is the right list to address this question)

On 02/25/2013 03:39 PM, Jon Leighton wrote:
I'm trying to unload the lksctp kernel module (sudo modprobe -r sctp),
but the operation fails with "FATAL: Module sctp is in use.". lsmod
shows a reference count of 2 for sctp. If I restart the machine, and
load the lksctp module by running a simple SCTP based program, the
module loads, but the reference count is 2 again, and the module can't
be unloaded. I've also tried to force the unload with sudo rmmod -f
sctp, but that fails with "ERROR: Removing 'sctp': Resource temporarily
unavailable". Is there a way to unload the module? I'm running Ubuntu
10.04 LTS with linux kernel 2.6.32-45-generic-pae. Thanks for any help.

rmmod -f used to work, but I haven't tried it lately.

The reason for the ref=2 is that when lksctp starts up, it creates a
control socket which holds those 2 refs on the module. 'modprobe -r'
will not let you unload when the module is refed.  rmmod -f works
around that.

sudo rmmod -f sctp returns "ERROR: Removing 'sctp': Resource temporarily
unavailable". Is there any workaround for this? Or perhaps this means
that I need to rebuild my kernel with CONFIG_MODULE_FORCE_UNLOAD enabled?

Yes, you need CONFIG_MODULE_FORCE_UNLOAD.  Without it rmmod -f doesn't work.

-vlad


-vlad


- Jon
--
To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html



--
To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Networking Development]     [Linux OMAP]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux