diff options
author | Oleg Nesterov <oleg@redhat.com> | 2010-08-09 17:20:30 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-09 20:45:05 -0700 |
commit | 2ee7c922f20c96dba56fd378a466790d87f42e84 (patch) | |
tree | 9eda39ff1867c4695c1e7349045ccc23176b623b /kernel/range.c | |
parent | 5bf1d290b57e392eaf4bfb15c67f315fce4140be (diff) |
sys_personality: remove the bogus checks in sys_personality()->__set_personality() path
Cleanup, no functional changes.
- __set_personality() always changes ->exec_domain/personality, the
special case when ->exec_domain remains the same buys nothing but
complicates the code. Unify both cases to simplify the code.
- The -EINVAL check in sys_personality() was never right. If we assume
that set_personality() can fail we should check the value it returns
instead of verifying that task->personality was actually changed.
Remove it. Before the previous patch it was possible to hit this case
due to overflow problems, but this -EINVAL just indicated the kernel
bug.
OTOH, probably it makes sense to change lookup_exec_domain() to return
ERR_PTR() instead of default_exec_domain if the search in exec_domains
list fails, and report this error to the user-space. But this means
another user-space change, and we have in-kernel users which need fixes.
For example, PER_OSF4 falls into PER_MASK for unkown reason and nobody
cares to register this domain.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Wenming Zhang <wezhang@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/range.c')
0 files changed, 0 insertions, 0 deletions