diff options
| author | Andi Kleen <ak@muc.de> | 2004-09-02 20:25:53 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-09-02 20:25:53 -0700 |
| commit | 973705e279f25125d89424f829fa559863cc05e7 (patch) | |
| tree | 4a1ae4ab1684fa808035460cabd3bd96fd62a05e /include/linux/node.h | |
| parent | 3f9b988c4c06ba2c08a8dfc8efe87a805c11e9c2 (diff) | |
[PATCH] Fix argument checking in sched_setaffinity
This patch fixes the argument length checking in sched_setaffinity.
Previously it would error out when the length passed was smaller than
sizeof(cpumask_t). And any bits beyond cpumask_s would be silently
ignored.
First this assumes that the user application knows the size of cpumask_t,
which should be kernel internal. When you increase cpumask_t old
applications break and there is no good way for the application to find out
the cpumask_t size the kernel uses.
This patch changes it to do similar checking to the NUMA API calls:
- Any length is ok as long as all online CPUs are covered (this could
still cause application breakage with more CPUs, but there is no good way
around it)
- When the user passes more than cpumask_t bytes the excess bytes are
checked to be zero.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/node.h')
0 files changed, 0 insertions, 0 deletions
