diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 13:02:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 13:02:14 -0400 |
commit | 9fd815b55f31be48dbb3dd23922587d247a4e497 (patch) | |
tree | 63814130acf3e472cc660ae71208c146f16dc5d6 /arch/s390/kernel/process.c | |
parent | 31bbb9b58d1e8ebcf2b28c95c2250a9f8e31e397 (diff) | |
parent | ed87b27e00d2ca240f62f3903583a2f1541fb9ef (diff) |
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (22 commits)
[S390] Update default configuration.
[S390] hibernate: Do real CPU swap at resume time
[S390] dasd: tolerate devices that have no feature codes
[S390] zcrypt: Do not add/remove devices in s/r callbacks
[S390] hibernate: make sure pfn_is_nosave handles lowcore pages
[S390] smp: introduce LC_ORDER and simplify lowcore handling
[S390] ptrace: use common code for simple peek/poke operations
[S390] fix disabled_wait inline assembly clobber list
[S390] Change kernel_page_present coding style.
[S390] hibernation: reset system after resume
[S390] hibernation: fix guest page hinting related crash
[S390] Get rid of init_module/delete_module compat functions.
[S390] Convert sys_execve to function with parameters.
[S390] Convert sys_clone to function with parameters.
[S390] qdio: change state of all primed input buffers
[S390] qdio: reduce per device debug messages
[S390] cio: introduce consistent subchannel scanning
[S390] cio: idset use actual number of ssids
[S390] cio: dont kfree vmalloced memory
[S390] cio: introduce css_settle
...
Diffstat (limited to 'arch/s390/kernel/process.c')
-rw-r--r-- | arch/s390/kernel/process.c | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 5a43f27eec13..59fe6ecc6ed3 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/elfcore.h> | 32 | #include <linux/elfcore.h> |
33 | #include <linux/kernel_stat.h> | 33 | #include <linux/kernel_stat.h> |
34 | #include <linux/syscalls.h> | 34 | #include <linux/syscalls.h> |
35 | #include <linux/compat.h> | ||
35 | #include <asm/compat.h> | 36 | #include <asm/compat.h> |
36 | #include <asm/uaccess.h> | 37 | #include <asm/uaccess.h> |
37 | #include <asm/pgtable.h> | 38 | #include <asm/pgtable.h> |
@@ -230,17 +231,11 @@ SYSCALL_DEFINE0(fork) | |||
230 | return do_fork(SIGCHLD, regs->gprs[15], regs, 0, NULL, NULL); | 231 | return do_fork(SIGCHLD, regs->gprs[15], regs, 0, NULL, NULL); |
231 | } | 232 | } |
232 | 233 | ||
233 | SYSCALL_DEFINE0(clone) | 234 | SYSCALL_DEFINE4(clone, unsigned long, newsp, unsigned long, clone_flags, |
235 | int __user *, parent_tidptr, int __user *, child_tidptr) | ||
234 | { | 236 | { |
235 | struct pt_regs *regs = task_pt_regs(current); | 237 | struct pt_regs *regs = task_pt_regs(current); |
236 | unsigned long clone_flags; | ||
237 | unsigned long newsp; | ||
238 | int __user *parent_tidptr, *child_tidptr; | ||
239 | 238 | ||
240 | clone_flags = regs->gprs[3]; | ||
241 | newsp = regs->orig_gpr2; | ||
242 | parent_tidptr = (int __user *) regs->gprs[4]; | ||
243 | child_tidptr = (int __user *) regs->gprs[5]; | ||
244 | if (!newsp) | 239 | if (!newsp) |
245 | newsp = regs->gprs[15]; | 240 | newsp = regs->gprs[15]; |
246 | return do_fork(clone_flags, newsp, regs, 0, | 241 | return do_fork(clone_flags, newsp, regs, 0, |
@@ -274,30 +269,25 @@ asmlinkage void execve_tail(void) | |||
274 | /* | 269 | /* |
275 | * sys_execve() executes a new program. | 270 | * sys_execve() executes a new program. |
276 | */ | 271 | */ |
277 | SYSCALL_DEFINE0(execve) | 272 | SYSCALL_DEFINE3(execve, char __user *, name, char __user * __user *, argv, |
273 | char __user * __user *, envp) | ||
278 | { | 274 | { |
279 | struct pt_regs *regs = task_pt_regs(current); | 275 | struct pt_regs *regs = task_pt_regs(current); |
280 | char *filename; | 276 | char *filename; |
281 | unsigned long result; | 277 | long rc; |
282 | int rc; | ||
283 | 278 | ||
284 | filename = getname((char __user *) regs->orig_gpr2); | 279 | filename = getname(name); |
285 | if (IS_ERR(filename)) { | 280 | rc = PTR_ERR(filename); |
286 | result = PTR_ERR(filename); | 281 | if (IS_ERR(filename)) |
282 | return rc; | ||
283 | rc = do_execve(filename, argv, envp, regs); | ||
284 | if (rc) | ||
287 | goto out; | 285 | goto out; |
288 | } | ||
289 | rc = do_execve(filename, (char __user * __user *) regs->gprs[3], | ||
290 | (char __user * __user *) regs->gprs[4], regs); | ||
291 | if (rc) { | ||
292 | result = rc; | ||
293 | goto out_putname; | ||
294 | } | ||
295 | execve_tail(); | 286 | execve_tail(); |
296 | result = regs->gprs[2]; | 287 | rc = regs->gprs[2]; |
297 | out_putname: | ||
298 | putname(filename); | ||
299 | out: | 288 | out: |
300 | return result; | 289 | putname(filename); |
290 | return rc; | ||
301 | } | 291 | } |
302 | 292 | ||
303 | /* | 293 | /* |