diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2008-06-06 07:46:32 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-06-06 20:29:11 +0200 |
commit | 37340746a66e5e7feed5945f28cb75d90a8fd9f6 (patch) | |
tree | b056132aad9eab38886b7359797302cbeeabc3fa /security | |
parent | pagemap: fix bug in add_to_pagemap, require aligned-length reads of /proc/pid... (diff) | |
download | linux-37340746a66e5e7feed5945f28cb75d90a8fd9f6.tar.xz linux-37340746a66e5e7feed5945f28cb75d90a8fd9f6.zip |
cpusets: fix bug when adding nonexistent cpu or mem
Adding a nonexistent cpu to a cpuset will be omitted quietly. It should
return -EINVAL.
Example: (real_nr_cpus <= 4 < NR_CPUS or cpu#4 was just offline)
# cat cpus
0-1
# /bin/echo 4 > cpus
# /bin/echo $?
0
# cat cpus
#
The same occurs when add a nonexistent mem.
This patch will fix this bug.
And when *buf == "", the check is unneeded.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Paul Jackson <pj@sgi.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions