public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] hurd: Restore destroying receive rights on sigreturn
@ 2023-04-12 22:49 Samuel Thibault
  0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2023-04-12 22:49 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6538a288be2a53d46570985e4b624323ee0f3aa9

commit 6538a288be2a53d46570985e4b624323ee0f3aa9
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Wed Apr 12 20:44:50 2023 +0000

    hurd: Restore destroying receive rights on sigreturn
    
    Just subtracting a ref is making signal/tst-signal signal/tst-raise
    signal/tst-minsigstksz-5 htl/tst-raise1 fail.

Diff:
---
 sysdeps/mach/hurd/i386/sigreturn.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sysdeps/mach/hurd/i386/sigreturn.c b/sysdeps/mach/hurd/i386/sigreturn.c
index 29c9629f45..4f19671069 100644
--- a/sysdeps/mach/hurd/i386/sigreturn.c
+++ b/sysdeps/mach/hurd/i386/sigreturn.c
@@ -102,8 +102,8 @@ __sigreturn (struct sigcontext *scp)
      reply port in use by the thread when interrupted.  */
   reply_port = THREAD_GETMEM (THREAD_SELF, reply_port);
   THREAD_SETMEM (THREAD_SELF, reply_port, scp->sc_reply_port);
-  __mach_port_mod_refs (__mach_task_self (), reply_port,
-                        MACH_PORT_RIGHT_RECEIVE, -1);
+  if (MACH_PORT_VALID (reply_port))
+    __mach_port_destroy (__mach_task_self (), reply_port);
 
   if (scp->sc_fpused)
     /* Restore the FPU state.  Mach conveniently stores the state

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-12 22:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-12 22:49 [glibc] hurd: Restore destroying receive rights on sigreturn Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).