diff options
-rw-r--r-- | kernel/signal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index dfb09ba5c013..75f7341b0c39 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -2101,10 +2101,11 @@ long do_no_restart_syscall(struct restart_block *param) | |||
2101 | int sigprocmask(int how, sigset_t *set, sigset_t *oldset) | 2101 | int sigprocmask(int how, sigset_t *set, sigset_t *oldset) |
2102 | { | 2102 | { |
2103 | int error; | 2103 | int error; |
2104 | sigset_t old_block; | ||
2105 | 2104 | ||
2106 | spin_lock_irq(¤t->sighand->siglock); | 2105 | spin_lock_irq(¤t->sighand->siglock); |
2107 | old_block = current->blocked; | 2106 | if (oldset) |
2107 | *oldset = current->blocked; | ||
2108 | |||
2108 | error = 0; | 2109 | error = 0; |
2109 | switch (how) { | 2110 | switch (how) { |
2110 | case SIG_BLOCK: | 2111 | case SIG_BLOCK: |
@@ -2121,8 +2122,7 @@ int sigprocmask(int how, sigset_t *set, sigset_t *oldset) | |||
2121 | } | 2122 | } |
2122 | recalc_sigpending(); | 2123 | recalc_sigpending(); |
2123 | spin_unlock_irq(¤t->sighand->siglock); | 2124 | spin_unlock_irq(¤t->sighand->siglock); |
2124 | if (oldset) | 2125 | |
2125 | *oldset = old_block; | ||
2126 | return error; | 2126 | return error; |
2127 | } | 2127 | } |
2128 | 2128 | ||