public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: balbir@in.ibm.com
Cc: menage@google.com, sekharan@us.ibm.com,
	ckrm-tech@lists.sourceforge.net, akpm@osdl.org, jlan@sgi.com,
	mbligh@google.com, rohitseth@google.com, winget@google.com,
	Simon.Derr@bull.net, linux-kernel@vger.kernel.org
Subject: Re: [ckrm-tech] [PATCH 6/6] Resource Groups over generic containers
Date: Sun, 5 Nov 2006 13:34:21 -0800	[thread overview]
Message-ID: <20061105133421.6cea9734.pj@sgi.com> (raw)
In-Reply-To: <454E5437.1020909@in.ibm.com>

Balbir wrote:
> This should be kmalloc(nbytes), an echo ".." has a "\n" associated
> with it.

But a:
  write(1, "..", 2);
does not have a trialing newline.

If some consumer of this kernel buffer copy of what the
user wrote cannot handle the possible trailing whitespace,
they will have to chomp (Perl phrase) it off.  You can't
just whack one byte blindly.

At least for the kernel/cpuset.c code, from whence this
came, the consumers of this kernel buffer copy are such
routines as simple_strtoul() and cpulist_parse(), both
of which cope with trailing newlines.

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.925.600.0401

  reply	other threads:[~2006-11-05 21:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20061004234316.677837000@menage.corp.google.com>
     [not found] ` <20061004235752.935272000@menage.corp.google.com>
2006-11-05 21:14   ` [ckrm-tech] [PATCH 6/6] Resource Groups over generic containers Balbir Singh
2006-11-05 21:34     ` Paul Jackson [this message]
2006-11-06  5:06       ` Balbir Singh
2006-11-06  5:07       ` 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=20061105133421.6cea9734.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=Simon.Derr@bull.net \
    --cc=akpm@osdl.org \
    --cc=balbir@in.ibm.com \
    --cc=ckrm-tech@lists.sourceforge.net \
    --cc=jlan@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@google.com \
    --cc=menage@google.com \
    --cc=rohitseth@google.com \
    --cc=sekharan@us.ibm.com \
    --cc=winget@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox