This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #18080] S390: Fix setcontext/swapcontext which are not restoring sigmask.


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]