Hi Li and Miao,

Do you also have testcases in the CPUSETS area ?

Regards--
Subrata

On Wed, Jul 2, 2008 at 3:24 PM, Li Zefan <[EMAIL PROTECTED]> wrote:

> >> 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.
> >
>
> Here is the patch:
>
> --- linux-2.6.26-rc7/kernel/cpuset.c.bak        2008-07-02
> 17:53:07.000000000 +0800
> +++ linux-2.6.26-rc7/kernel/cpuset.c    2008-07-02 17:53:23.000000000 +0800
> @@ -1011,7 +1011,7 @@ done:
>   * lock each such tasks mm->mmap_sem, scan its vma's and rebind
>  * their mempolicies to the cpusets new mems_allowed.
>  */
> -static int update_nodemask(struct cpuset *cs, char *buf)
> +static int update_nodemask(struct cpuset *cs, const char *buf)
>  {
>        struct cpuset trialcs;
>        nodemask_t oldmem;
> @@ -1032,7 +1032,6 @@ static int update_nodemask(struct cpuset
>          * that parsing.  The validate_change() call ensures that cpusets
>         * with tasks have memory.
>         */
> -       buf = strstrip(buf);
>        if (!*buf) {
>                nodes_clear(trialcs.mems_allowed);
>        } else {
>
>
> >> Taking a copy of the string in update_nodemask() would fix things, but
> >> that's pretty lame.
> >>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>



-- 
Regards & Thanks--
Subrata
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to