diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-08-01 14:18:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-08-01 14:18:56 -0400 |
commit | 0dd8486b5cfe8048e0613334659d9252ecd1b08a (patch) | |
tree | c221d40b94aecfd75b25dea768bba0b9f97cb9c8 /kernel | |
parent | 0083fc2c50e6c5127c2802ad323adf8143ab7856 (diff) |
do_sigaltstack: small cleanups
The previous commit ("do_sigaltstack: avoid copying 'stack_t' as a
structure to user space") fixed a real bug. This one just cleans up the
copy from user space to that gcc can generate better code for it (and so
that it looks the same as the later copy back to user space).
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/signal.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index f268372c0cc0..64c5deeaca5d 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -2464,10 +2464,12 @@ do_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, unsigned long s | |||
2464 | int ss_flags; | 2464 | int ss_flags; |
2465 | 2465 | ||
2466 | error = -EFAULT; | 2466 | error = -EFAULT; |
2467 | if (!access_ok(VERIFY_READ, uss, sizeof(*uss)) | 2467 | if (!access_ok(VERIFY_READ, uss, sizeof(*uss))) |
2468 | || __get_user(ss_sp, &uss->ss_sp) | 2468 | goto out; |
2469 | || __get_user(ss_flags, &uss->ss_flags) | 2469 | error = __get_user(ss_sp, &uss->ss_sp) | |
2470 | || __get_user(ss_size, &uss->ss_size)) | 2470 | __get_user(ss_flags, &uss->ss_flags) | |
2471 | __get_user(ss_size, &uss->ss_size); | ||
2472 | if (error) | ||
2471 | goto out; | 2473 | goto out; |
2472 | 2474 | ||
2473 | error = -EPERM; | 2475 | error = -EPERM; |