diff options
| author | 2021-12-20 10:00:30 +0100 | |
|---|---|---|
| committer | 2021-12-20 10:00:30 +0100 | |
| commit | 35eaa42c4a1017c08d0572008db375becb621744 (patch) | |
| tree | 8185b6d18acfc63285e3132c9039c7d6c9a90527 /kernel/signal.c | |
| parent | serial: 8250_pci: remove redundant assignment to tmp after the mask operation (diff) | |
| parent | Linux 5.16-rc6 (diff) | |
| download | wireguard-linux-35eaa42c4a1017c08d0572008db375becb621744.tar.xz wireguard-linux-35eaa42c4a1017c08d0572008db375becb621744.zip | |
Merge 5.16-rc6 into tty-next
We need the tty/serial fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/signal.c')
| -rw-r--r-- | kernel/signal.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index a629b11bf3e0..dfcee3888b00 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -4185,6 +4185,15 @@ do_sigaltstack (const stack_t *ss, stack_t *oss, unsigned long sp, ss_mode != 0)) return -EINVAL; + /* + * Return before taking any locks if no actual + * sigaltstack changes were requested. + */ + if (t->sas_ss_sp == (unsigned long)ss_sp && + t->sas_ss_size == ss_size && + t->sas_ss_flags == ss_flags) + return 0; + sigaltstack_lock(); if (ss_mode == SS_DISABLE) { ss_size = 0; |
