Skip to content

Commit

Permalink
parisc: simplify sys_clone()
Browse files Browse the repository at this point in the history
No need to test clone_flags here and set parent_tidptr and child_tidptr
accordingly. The same check will be done in do_fork() and copy_process() anyway.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
  • Loading branch information
Helge Deller authored and Kyle McMartin committed Mar 31, 2009
1 parent 548f117 commit 803094f
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions arch/parisc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,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
Expand All @@ -243,16 +243,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);
}

Expand Down

0 comments on commit 803094f

Please sign in to comment.