All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Yasevich <vyasevich@gmail.com>
To: linux-sctp@vger.kernel.org
Subject: Re: How to unload lksctp kernel module?
Date: Tue, 26 Feb 2013 15:21:28 +0000	[thread overview]
Message-ID: <512CD2F8.5040609@gmail.com> (raw)
In-Reply-To: <512BDEFF.4090103@redhat.com>

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@vger.kernel.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>


      parent reply	other threads:[~2013-02-26 15:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-25 22:00 How to unload lksctp kernel module? Daniel Borkmann
2013-02-26 14:13 ` Vlad Yasevich
2013-02-26 15:00 ` Jon Leighton
2013-02-26 15:21 ` Vlad Yasevich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=512CD2F8.5040609@gmail.com \
    --to=vyasevich@gmail.com \
    --cc=linux-sctp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.