projects
/
linux-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'core-iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-block.git]
/
kernel
/
exec_domain.c
diff --git
a/kernel/exec_domain.c
b/kernel/exec_domain.c
index dd62f8e714ca52d2fed7a7b14b03a6ee9a53d2f1..0dbeae37422509d376e23b4d7b05237150479dd6 100644
(file)
--- a/
kernel/exec_domain.c
+++ b/
kernel/exec_domain.c
@@
-134,23
+134,14
@@
unregister:
return 0;
}
return 0;
}
-int
-__set_personality(unsigned int personality)
+int __set_personality(unsigned int personality)
{
{
- struct exec_domain *ep, *oep;
-
- ep = lookup_exec_domain(personality);
- if (ep == current_thread_info()->exec_domain) {
- current->personality = personality;
- module_put(ep->module);
- return 0;
- }
+ struct exec_domain *oep = current_thread_info()->exec_domain;
+ current_thread_info()->exec_domain = lookup_exec_domain(personality);
current->personality = personality;
current->personality = personality;
- oep = current_thread_info()->exec_domain;
- current_thread_info()->exec_domain = ep;
-
module_put(oep->module);
module_put(oep->module);
+
return 0;
}
return 0;
}
@@
-192,11
+183,8
@@
SYSCALL_DEFINE1(personality, unsigned int, personality)
{
unsigned int old = current->personality;
{
unsigned int old = current->personality;
- if (personality != 0xffffffff)
{
+ if (personality != 0xffffffff)
set_personality(personality);
set_personality(personality);
- if (current->personality != personality)
- return -EINVAL;
- }
return old;
}
return old;
}