public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Lucas De Marchi <lucas.de.marchi@gmail.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Valerio Vanni <valerio.vanni@inwind.it>,
	Elliott@ozlabs.org, Robert <Elliott@hp.com>
Subject: Re: [PATCH] module: remove warning about waiting module removal.
Date: Mon, 28 Apr 2014 11:25:55 +0930	[thread overview]
Message-ID: <87eh0itdxw.fsf@rustcorp.com.au> (raw)
In-Reply-To: <CAKi4VALZ9or4yqTt1LgZgzv4aK+pqf6o+opw0peERFi27esteg@mail.gmail.com>

Lucas De Marchi <lucas.de.marchi@gmail.com> writes:
> Hi Rusty,
>
> On Thu, Apr 24, 2014 at 3:24 AM, Rusty Russell <rusty@rustcorp.com.au> wrote:
>> We remove the waiting module removal in commit 3f2b9c9cdf38 (September
>> 2013), but it turns out that modprobe in kmod (< version 16) was
>> asking for waiting module removal.  Noone noticed since modprobe would
>> check for 0 usage immediately before trying to remove the module, and
>> the race is unlikely.
>>
>> However, it means that anyone running old (but not ancient) kmod
>> versions is hitting the printk designed to see if anyone was running
>> "rmmod -w".  All reports so far have been false positives, so remove
>> the warning.
>>
>> Fixes: 3f2b9c9cdf389e303b2273679af08aab5f153517
>> Reported-by: Valerio Vanni <valerio.vanni@inwind.it>
>> Cc: Elliott, Robert (Server Storage) <Elliott@hp.com>
>> Cc: stable@kernel.org
>> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
>>
>> diff --git a/kernel/module.c b/kernel/module.c
>> index 11869408f79b..ae7821898bf2 100644
>> --- a/kernel/module.c
>> +++ b/kernel/module.c
>> @@ -815,9 +815,6 @@ SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
>>                 return -EFAULT;
>>         name[MODULE_NAME_LEN-1] = '\0';
>>
>> -       if (!(flags & O_NONBLOCK))
>> -               pr_warn("waiting module removal not supported: please upgrade\n");
>> -
>>         if (mutex_lock_interruptible(&module_mutex) != 0)
>>                 return -EINTR;
>>
>
> Ack.
>
> If you are going to apply this, do you think it'd be still good to
> patch kmod on distros, so at least modprobe -r uses O_NONBLOCK? Or
> having this patch in kernel is sufficient?

I think it's sufficient: distros will get this patch via stable.  kmod
updates can occur at a natural pace.

Thanks,
Rusty.



      reply	other threads:[~2014-04-28  2:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-24  6:24 [PATCH] module: remove warning about waiting module removal Rusty Russell
2014-04-24 11:15 ` Lucas De Marchi
2014-04-28  1:55   ` Rusty Russell [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=87eh0itdxw.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=Elliott@hp.com \
    --cc=Elliott@ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.de.marchi@gmail.com \
    --cc=valerio.vanni@inwind.it \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox