|
@@ -103,6 +103,9 @@ long arch_prctl_skas(struct task_struct *task, int code,
|
|
|
|
|
|
switch(code){
|
|
switch(code){
|
|
case ARCH_SET_FS:
|
|
case ARCH_SET_FS:
|
|
|
|
+ current->thread.arch.fs = (unsigned long) ptr;
|
|
|
|
+ save_registers(pid, ¤t->thread.regs.regs);
|
|
|
|
+ break;
|
|
case ARCH_SET_GS:
|
|
case ARCH_SET_GS:
|
|
save_registers(pid, ¤t->thread.regs.regs);
|
|
save_registers(pid, ¤t->thread.regs.regs);
|
|
break;
|
|
break;
|
|
@@ -140,9 +143,8 @@ long sys_clone(unsigned long clone_flags, unsigned long newsp,
|
|
|
|
|
|
void arch_switch_to_skas(struct task_struct *from, struct task_struct *to)
|
|
void arch_switch_to_skas(struct task_struct *from, struct task_struct *to)
|
|
{
|
|
{
|
|
- if(to->thread.arch.fs == 0)
|
|
|
|
|
|
+ if((to->thread.arch.fs == 0) || (to->mm == NULL))
|
|
return;
|
|
return;
|
|
|
|
|
|
arch_prctl_skas(to, ARCH_SET_FS, (void __user *) to->thread.arch.fs);
|
|
arch_prctl_skas(to, ARCH_SET_FS, (void __user *) to->thread.arch.fs);
|
|
}
|
|
}
|
|
-
|
|
|