* [hurd,commited] hurd: Fix message reception for timer_thread
@ 2020-01-05 17:11 Samuel Thibault
0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2020-01-05 17:11 UTC (permalink / raw)
To: libc-alpha; +Cc: Samuel Thibault, commit-hurd
Without a proper size, we get MACH_RCV_TOO_LARGE instead of MACH_MSG_SUCCESS.
* sysdeps/mach/hurd/setitimer.c (timer_thread): Add return_code_type
field to received message, and set the receive size in __mach_msg call.
---
sysdeps/mach/hurd/setitimer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sysdeps/mach/hurd/setitimer.c b/sysdeps/mach/hurd/setitimer.c
index 4a6fd1fe33..b16f4ddd5d 100644
--- a/sysdeps/mach/hurd/setitimer.c
+++ b/sysdeps/mach/hurd/setitimer.c
@@ -80,6 +80,7 @@ timer_thread (void)
struct
{
mach_msg_header_t header;
+ mach_msg_type_t return_code_type;
error_t return_code;
} msg;
@@ -89,7 +90,7 @@ timer_thread (void)
_hurd_itimerval. */
err = __mach_msg (&msg.header,
MACH_RCV_MSG|MACH_RCV_TIMEOUT|MACH_RCV_INTERRUPT,
- 0, 0, _hurd_itimer_port,
+ 0, sizeof(msg), _hurd_itimer_port,
_hurd_itimerval.it_value.tv_sec * 1000
+ _hurd_itimerval.it_value.tv_usec / 1000,
MACH_PORT_NULL);
--
2.24.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-01-05 17:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-05 17:11 [hurd,commited] hurd: Fix message reception for timer_thread 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).