X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=arch%2Fparisc%2Fkernel%2Fprocess.c;h=6f69101f90bb24df54b99259a5419f84a76dbb35;hb=3ba113d14cedcd88105a3b9c90f8ecce829e1095;hp=8aa591ed9127d5e1f8aa9982ce3827c6b3bc2982;hpb=bad6a5c08c119572c888d5df2bd7691a4da6b9e8;p=karo-tx-linux.git diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 8aa591ed9127..6f69101f90bb 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -46,14 +46,15 @@ #include #include #include +#include #include #include #include #include #include -#include #include +#include /* * The idle thread. There's no useful work to be @@ -231,8 +232,8 @@ sys_clone(unsigned long clone_flags, unsigned long usp, However, these last 3 args are only examined if the proper flags are set. */ - int __user *child_tidptr; - int __user *parent_tidptr; + int __user *parent_tidptr = (int __user *)regs->gr[24]; + int __user *child_tidptr = (int __user *)regs->gr[22]; /* usp must be word aligned. This also prevents users from * passing in the value 1 (which is the signal for a special @@ -243,16 +244,6 @@ sys_clone(unsigned long clone_flags, unsigned long usp, if (usp == 0) usp = regs->gr[30]; - if (clone_flags & CLONE_PARENT_SETTID) - parent_tidptr = (int __user *)regs->gr[24]; - else - parent_tidptr = NULL; - - if (clone_flags & (CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID)) - child_tidptr = (int __user *)regs->gr[22]; - else - child_tidptr = NULL; - return do_fork(clone_flags, usp, regs, 0, parent_tidptr, child_tidptr); } @@ -400,3 +391,15 @@ get_wchan(struct task_struct *p) } while (count++ < 16); return 0; } + +#ifdef CONFIG_64BIT +void *dereference_function_descriptor(void *ptr) +{ + Elf64_Fdesc *desc = ptr; + void *p; + + if (!probe_kernel_address(&desc->addr, p)) + ptr = p; + return ptr; +} +#endif