This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ #18080] S390: Fix setcontext/swapcontext which are not restoring sigmask.
- From: Andreas Schwab <schwab at suse dot de>
- To: Stefan Liebler <stli at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 04 Mar 2015 12:48:13 +0100
- Subject: Re: [PATCH][BZ #18080] S390: Fix setcontext/swapcontext which are not restoring sigmask.
- Authentication-results: sourceware.org; auth=none
- References: <md6q4p$556$1 at ger dot gmane dot org>
Stefan Liebler <stli@linux.vnet.ibm.com> writes:
> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S b/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S
> index c40f465..c385110 100644
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S
> +++ b/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S
> @@ -75,7 +75,7 @@ ENTRY(__swapcontext)
> stm %r0,%r15,SC_GPRS(%r1)
>
> /* sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL). */
> - la %r2,SIG_BLOCK
> + la %r2,SIG_SETMASK
> lr %r5,%r0
> la %r3,SC_MASK(%r5)
> slr %r4,%r4
There is no need to call sigprocmask twice, you can swap the mask with a
single call. Also, %r2 is clobbered here.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."