diff options
author | Helge Deller <deller@gmx.de> | 2009-02-13 17:58:29 -0500 |
---|---|---|
committer | Kyle McMartin <kyle@mcmartin.ca> | 2009-03-30 22:51:34 -0400 |
commit | 803094f480aa5b7dd5187a17e6e60ff24721c212 (patch) | |
tree | fa1114e85294e30233263f429fe560eae8a2f718 /arch/parisc | |
parent | 548f1176f0ac637eff895defb715ce6fde7c460a (diff) |
parisc: simplify sys_clone()
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>
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/kernel/process.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index b80e02a4d81d..ad585fd7748e 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -231,8 +231,8 @@ sys_clone(unsigned long clone_flags, unsigned long usp, | |||
231 | 231 | ||
232 | However, these last 3 args are only examined | 232 | However, these last 3 args are only examined |
233 | if the proper flags are set. */ | 233 | if the proper flags are set. */ |
234 | int __user *child_tidptr; | 234 | int __user *parent_tidptr = (int __user *)regs->gr[24]; |
235 | int __user *parent_tidptr; | 235 | int __user *child_tidptr = (int __user *)regs->gr[22]; |
236 | 236 | ||
237 | /* usp must be word aligned. This also prevents users from | 237 | /* usp must be word aligned. This also prevents users from |
238 | * passing in the value 1 (which is the signal for a special | 238 | * passing in the value 1 (which is the signal for a special |
@@ -243,16 +243,6 @@ sys_clone(unsigned long clone_flags, unsigned long usp, | |||
243 | if (usp == 0) | 243 | if (usp == 0) |
244 | usp = regs->gr[30]; | 244 | usp = regs->gr[30]; |
245 | 245 | ||
246 | if (clone_flags & CLONE_PARENT_SETTID) | ||
247 | parent_tidptr = (int __user *)regs->gr[24]; | ||
248 | else | ||
249 | parent_tidptr = NULL; | ||
250 | |||
251 | if (clone_flags & (CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID)) | ||
252 | child_tidptr = (int __user *)regs->gr[22]; | ||
253 | else | ||
254 | child_tidptr = NULL; | ||
255 | |||
256 | return do_fork(clone_flags, usp, regs, 0, parent_tidptr, child_tidptr); | 246 | return do_fork(clone_flags, usp, regs, 0, parent_tidptr, child_tidptr); |
257 | } | 247 | } |
258 | 248 | ||