All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Emelianov <xemul@openvz.org>
To: Balbir Singh <balbir@in.ibm.com>
Cc: Linux MM <linux-mm@kvack.org>,
	dev@openvz.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	ckrm-tech@lists.sourceforge.net, haveblue@us.ibm.com,
	rohitseth@google.com
Subject: Re: [RFC][PATCH 7/8] RSS controller fix resource groups parsing
Date: Fri, 10 Nov 2006 12:13:26 +0300	[thread overview]
Message-ID: <455442B6.30800@openvz.org> (raw)
In-Reply-To: <20061109193627.21437.88058.sendpatchset@balbir.in.ibm.com>

Balbir Singh wrote:
> echo adds a "\n" to the end of a string. When this string is copied from
> user space, we need to remove it, so that match_token() can parse
> the user space string correctly
> 
> Signed-off-by: Balbir Singh <balbir@in.ibm.com>
> ---
> 
>  kernel/res_group/rgcs.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff -puN kernel/res_group/rgcs.c~container-res-groups-fix-parsing kernel/res_group/rgcs.c
> --- linux-2.6.19-rc2/kernel/res_group/rgcs.c~container-res-groups-fix-parsing	2006-11-09 23:08:10.000000000 +0530
> +++ linux-2.6.19-rc2-balbir/kernel/res_group/rgcs.c	2006-11-09 23:08:10.000000000 +0530
> @@ -241,6 +241,12 @@ ssize_t res_group_file_write(struct cont
>  	}
>  	buf[nbytes] = 0;	/* nul-terminate */
>  
> +	/*
> +	 * Ignore "\n". It might come in from echo(1)

Why not inform user he should call echo -n?

> +	 */
> +	if (buf[nbytes - 1] == '\n')
> +		buf[nbytes - 1] = 0;
> +
>  	container_manage_lock();
>  
>  	if (container_is_removed(cont)) {
> _
> 

That's the same patch as in [PATCH 1/8] mail. Did you attached
a wrong one?

WARNING: multiple messages have this Message-ID (diff)
From: Pavel Emelianov <xemul@openvz.org>
To: Balbir Singh <balbir@in.ibm.com>
Cc: Linux MM <linux-mm@kvack.org>,
	dev@openvz.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	ckrm-tech@lists.sourceforge.net, haveblue@us.ibm.com,
	rohitseth@google.com
Subject: Re: [RFC][PATCH 7/8] RSS controller fix resource groups parsing
Date: Fri, 10 Nov 2006 12:13:26 +0300	[thread overview]
Message-ID: <455442B6.30800@openvz.org> (raw)
In-Reply-To: <20061109193627.21437.88058.sendpatchset@balbir.in.ibm.com>

Balbir Singh wrote:
> echo adds a "\n" to the end of a string. When this string is copied from
> user space, we need to remove it, so that match_token() can parse
> the user space string correctly
> 
> Signed-off-by: Balbir Singh <balbir@in.ibm.com>
> ---
> 
>  kernel/res_group/rgcs.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff -puN kernel/res_group/rgcs.c~container-res-groups-fix-parsing kernel/res_group/rgcs.c
> --- linux-2.6.19-rc2/kernel/res_group/rgcs.c~container-res-groups-fix-parsing	2006-11-09 23:08:10.000000000 +0530
> +++ linux-2.6.19-rc2-balbir/kernel/res_group/rgcs.c	2006-11-09 23:08:10.000000000 +0530
> @@ -241,6 +241,12 @@ ssize_t res_group_file_write(struct cont
>  	}
>  	buf[nbytes] = 0;	/* nul-terminate */
>  
> +	/*
> +	 * Ignore "\n". It might come in from echo(1)

Why not inform user he should call echo -n?

> +	 */
> +	if (buf[nbytes - 1] == '\n')
> +		buf[nbytes - 1] = 0;
> +
>  	container_manage_lock();
>  
>  	if (container_is_removed(cont)) {
> _
> 

That's the same patch as in [PATCH 1/8] mail. Did you attached
a wrong one?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-11-10  9:18 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-09 19:35 [RFC][PATCH 0/8] RSS controller for containers Balbir Singh
2006-11-09 19:35 ` Balbir Singh
2006-11-09 19:35 ` [RFC][PATCH 1/8] Fix resource groups parsing, while assigning shares Balbir Singh
2006-11-09 19:35   ` Balbir Singh
2006-11-09 19:35 ` [RFC][PATCH 2/8] RSS controller setup Balbir Singh
2006-11-09 19:35   ` Balbir Singh
2006-11-09 19:35 ` [RFC][PATCH 3/8] RSS controller add callbacks Balbir Singh
2006-11-09 19:35   ` Balbir Singh
2006-11-09 19:36 ` [RFC][PATCH 4/8] RSS controller accounting Balbir Singh
2006-11-09 19:36   ` Balbir Singh
2006-11-10  9:06   ` Pavel Emelianov
2006-11-10  9:06     ` Pavel Emelianov
2006-11-10  9:29     ` Balbir Singh
2006-11-10  9:29       ` Balbir Singh
2006-11-09 19:36 ` [RFC][PATCH 5/8] RSS controller task migration support Balbir Singh
2006-11-09 19:36   ` Balbir Singh
2006-11-09 19:36 ` [RFC][PATCH 6/8] RSS controller shares allocation Balbir Singh
2006-11-09 19:36   ` Balbir Singh
2006-11-10  9:11   ` Pavel Emelianov
2006-11-10  9:11     ` Pavel Emelianov
2006-11-10 10:27     ` [ckrm-tech] " Balbir Singh
2006-11-10 10:27       ` Balbir Singh
2006-11-10 10:32       ` Pavel Emelianov
2006-11-10 10:32         ` Pavel Emelianov
2006-11-10 12:55         ` Balbir Singh
2006-11-10 12:55           ` Balbir Singh
2006-11-09 19:36 ` [RFC][PATCH 7/8] RSS controller fix resource groups parsing Balbir Singh
2006-11-09 19:36   ` Balbir Singh
2006-11-10  9:13   ` Pavel Emelianov [this message]
2006-11-10  9:13     ` Pavel Emelianov
2006-11-10  9:32     ` Balbir Singh
2006-11-10  9:32       ` Balbir Singh
2006-11-09 19:36 ` [RFC][PATCH 8/8] RSS controller support reclamation Balbir Singh
2006-11-09 19:36   ` Balbir Singh
2006-11-09 19:45   ` Arjan van de Ven
2006-11-09 19:45     ` Arjan van de Ven
2006-11-10  1:56     ` [ckrm-tech] " Balbir Singh
2006-11-10  1:56       ` Balbir Singh
2006-11-10  8:54   ` Pavel Emelianov
2006-11-10  8:54     ` Pavel Emelianov
2006-11-10  9:16     ` Balbir Singh
2006-11-10  9:16       ` Balbir Singh
2006-11-10  9:29       ` Pavel Emelianov
2006-11-10  9:29         ` Pavel Emelianov
2006-11-10 12:42         ` Balbir Singh
2006-11-10 12:42           ` Balbir Singh

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=455442B6.30800@openvz.org \
    --to=xemul@openvz.org \
    --cc=balbir@in.ibm.com \
    --cc=ckrm-tech@lists.sourceforge.net \
    --cc=dev@openvz.org \
    --cc=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rohitseth@google.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 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.