public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Sergei Ianovich <ynvich@gmail.com>, linux-kernel@vger.kernel.org
Cc: Sergei Ianovich <ynvich@gmail.com>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>
Subject: Re: [PATCH v2] fix printk output
Date: Tue, 10 Dec 2013 15:59:36 +1030	[thread overview]
Message-ID: <87a9g9s27z.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1385826152-17531-1-git-send-email-ynvich@gmail.com>

Sergei Ianovich <ynvich@gmail.com> writes:
> Signed-off-by: Sergei Ianovich <ynvich@gmail.com>
> CC: Hannes Frederic Sowa <hannes@stressinduktion.org>
> ---
>  Changes v1..v2
>  * 1-for-1 match between source and output lines
>  * clarify warning
>  * print tool name to avoid confusion with what to upgrade

Hmm, the copy here is gratuitous.  Using current->comm is safe, just
possibly ambigious if someone is changing the task name at the same time.

And we really want this one line anyway:

  		printk(KERN_WARNING
 		       "%s: waiting module removal not supported: please upgrade\n",
                        current->comm);

BTW, did you actually hit this?

Thanks,
Rusty.

>  kernel/module.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/module.c b/kernel/module.c
> index f5a3b1e..0e627e7 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -816,8 +816,10 @@ SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
>  	name[MODULE_NAME_LEN-1] = '\0';
>  
>  	if (!(flags & O_NONBLOCK)) {
> +		char tool[TASK_COMM_LEN];
>  		printk(KERN_WARNING
> -		       "waiting module removal not supported: please upgrade");
> +		       "waiting module removal no longer supported\n"
> +		       "please upgrade %s\n", get_task_comm(tool, current));
>  	}
>  
>  	if (mutex_lock_interruptible(&module_mutex) != 0)
> -- 
> 1.8.4.3

  reply	other threads:[~2013-12-10  7:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-27 22:03 [PATCH] fix printk output Sergei Ianovich
2013-11-27 22:07 ` Hannes Frederic Sowa
2013-11-30 15:42   ` [PATCH v2] " Sergei Ianovich
2013-12-10  5:29     ` Rusty Russell [this message]
2013-12-10  7:29       ` Sergei Ianovich
2014-04-23  5:14         ` Rusty Russell
2014-04-23  9:50           ` Lucas De Marchi

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=87a9g9s27z.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=hannes@stressinduktion.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ynvich@gmail.com \
    /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