X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=kernel%2Fexec_domain.c;h=c35452cadded85de8e4505def877b3c5561c991f;hb=0d2daf5cc858bd9305bae187310a1dabaad0a2db;hp=0511716e94247a86873bb095e1136d45aa362c2c;hpb=6e62775ece1c83a84d86df44cfd8ea3e6c96ce23;p=safe%2Fjmp%2Flinux-2.6 diff --git a/kernel/exec_domain.c b/kernel/exec_domain.c index 0511716..c35452c 100644 --- a/kernel/exec_domain.c +++ b/kernel/exec_domain.c @@ -18,6 +18,7 @@ #include #include #include +#include static void default_handler(int, struct pt_regs *); @@ -145,28 +146,6 @@ __set_personality(u_long personality) return 0; } - if (atomic_read(¤t->fs->count) != 1) { - struct fs_struct *fsp, *ofsp; - - fsp = copy_fs_struct(current->fs); - if (fsp == NULL) { - module_put(ep->module); - return -ENOMEM; - } - - task_lock(current); - ofsp = current->fs; - current->fs = fsp; - task_unlock(current); - - put_fs_struct(ofsp); - } - - /* - * At that point we are guaranteed to be the sole owner of - * current->fs. - */ - current->personality = personality; oep = current_thread_info()->exec_domain; current_thread_info()->exec_domain = ep; @@ -209,8 +188,7 @@ static int __init proc_execdomains_init(void) module_init(proc_execdomains_init); #endif -asmlinkage long -sys_personality(u_long personality) +SYSCALL_DEFINE1(personality, u_long, personality) { u_long old = current->personality;