[hurd,commited] hurd: Fix restoring message to be retried

Message ID 20240713151418.2975736-1-samuel.thibault@ens-lyon.org
State Committed
Commit c8b4ce0b368115714bd4cce131e1683759471099
Headers
Series [hurd,commited] hurd: Fix restoring message to be retried |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch warning Patch already apply to master at the time it was sent
redhat-pt-bot/TryBot-32bit fail Patch series failed to apply

Commit Message

Samuel Thibault July 13, 2024, 3:14 p.m. UTC
  save_data stores the start of the original message to be retried,
overwritten by the EINTR reply. In 64b builds the overwrite is however
rounded up to the 64b pointer size, so we have to save more than just
the 32b err.

Thanks a lot to Luca Dariz for the investigation!
---
 hurd/intr-msg.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Patch

diff --git a/hurd/intr-msg.c b/hurd/intr-msg.c
index 2c2e7dc463..424c1fc700 100644
--- a/hurd/intr-msg.c
+++ b/hurd/intr-msg.c
@@ -42,7 +42,10 @@  _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
   struct clobber
   {
     mach_msg_type_t type;
-    error_t err;
+    union {
+      error_t err;
+      uintptr_t align;
+    };
   };
   union msg
   {