All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: miaox@cn.fujitsu.com, Linux-Kernel <linux-kernel@vger.kernel.org>,
	Paul Jackson <pj@sgi.com>, Paul Menage <menage@google.com>
Subject: Re: [PATCH 1/2] cpusets: restructure the function update_cpumask() and update_nodemask()
Date: Wed, 02 Jul 2008 17:41:38 +0800	[thread overview]
Message-ID: <486B4D52.80402@cn.fujitsu.com> (raw)
In-Reply-To: <20080702021908.81a5f1bb.akpm@linux-foundation.org>

Andrew Morton wrote:
> On Mon, 02 Jun 2008 16:31:05 +0800 Miao Xie <miaox@cn.fujitsu.com> wrote:
> 
>> extract two functions from update_cpumask() and update_nodemask().They will be
>> used later for updating tasks' cpus_allowed and mems_allowed after CPU/NODE
>> offline/online.
>>
>> Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
>> Acked-by: Paul Jackson <pj@sgi.com>
> 
> This patch has problems.
> 
> kernel/cpuset.c: In function 'cpuset_write_resmask':
> kernel/cpuset.c:1374: warning: passing argument 2 of 'update_nodemask' discards qualifiers from pointer target type
> 
> Did you not get this warning also?
> 
> I don't know how to fix it.  cftype.write_string() requires a const
> char* in the third arg, but we then go on to call update_nodemask(),
> which does a strstrip() on this allegedly-const char array.
> 

That strstrip() should be removed. because cgroup_write_string() already strstrip()ed
the buffer. Paul M's original patch removed that 2 strstrip()s in cpuset.c.

> Taking a copy of the string in update_nodemask() would fix things, but
> that's pretty lame.
> 

  reply	other threads:[~2008-07-02  9:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-02  8:31 [PATCH 1/2] cpusets: restructure the function update_cpumask() and update_nodemask() Miao Xie
2008-06-02  9:55 ` Paul Jackson
2008-06-03 22:03 ` Andrew Morton
2008-06-04  0:55   ` Li Zefan
2008-06-04  2:00     ` Miao Xie
2008-06-04  2:11       ` Andrew Morton
2008-06-04  2:16         ` Li Zefan
2008-06-04  2:59         ` Paul Jackson
2008-06-04  4:00           ` Andrew Morton
2008-06-04  4:02             ` Andrew Morton
2008-06-04  4:07               ` Paul Jackson
2008-07-02  9:19 ` Andrew Morton
2008-07-02  9:41   ` Li Zefan [this message]
2008-07-02  9:54     ` Li Zefan
  -- strict thread matches above, loose matches on Subject: below --
2008-06-04  2:03 Miao Xie

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=486B4D52.80402@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=miaox@cn.fujitsu.com \
    --cc=pj@sgi.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.