summaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-08-01 11:18:56 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-08-01 11:18:56 -0700
commit0dd8486b5cfe8048e0613334659d9252ecd1b08a (patch)
treec221d40b94aecfd75b25dea768bba0b9f97cb9c8 /kernel/signal.c
parent0083fc2c50e6c5127c2802ad323adf8143ab7856 (diff)
downloadop-kernel-dev-0dd8486b5cfe8048e0613334659d9252ecd1b08a.zip
op-kernel-dev-0dd8486b5cfe8048e0613334659d9252ecd1b08a.tar.gz
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/signal.c')
-rw-r--r--kernel/signal.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index f268372c..64c5dee 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
int ss_flags;
error = -EFAULT;
- if (!access_ok(VERIFY_READ, uss, sizeof(*uss))
- || __get_user(ss_sp, &uss->ss_sp)
- || __get_user(ss_flags, &uss->ss_flags)
- || __get_user(ss_size, &uss->ss_size))
+ if (!access_ok(VERIFY_READ, uss, sizeof(*uss)))
+ goto out;
+ error = __get_user(ss_sp, &uss->ss_sp) |
+ __get_user(ss_flags, &uss->ss_flags) |
+ __get_user(ss_size, &uss->ss_size);
+ if (error)
goto out;
error = -EPERM;
OpenPOWER on IntegriCloud