git: 4a1f66b81f24 - stable/13 - Revert "linux(4): The futex_wait operation should restart."

From: Dmitry Chagin <dchagin_at_FreeBSD.org>
Date: Thu, 29 Jun 2023 08:20:52 UTC
The branch stable/13 has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=4a1f66b81f24c4ae0207e2898eba145299609308

commit 4a1f66b81f24c4ae0207e2898eba145299609308
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2023-06-11 09:47:27 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2023-06-29 08:16:03 +0000

    Revert "linux(4): The futex_wait operation should restart."
    
    This reverts commit 5eec19c8eb0e1afafd7290325c61611c9a13b621 due to its
    wrong. Linux interrupts futex syscall on signal and return EINTR.
    
    (cherry picked from commit 486459056822f080b1ae24600a4c6a7d8ff6f7d6)
---
 sys/compat/linux/linux_futex.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c
index 74f89e3d49fb..d265b015b799 100644
--- a/sys/compat/linux/linux_futex.c
+++ b/sys/compat/linux/linux_futex.c
@@ -786,6 +786,8 @@ linux_futex_wait(struct thread *td, struct linux_futex_args *args)
 	}
 	umtxq_unlock(&uq->uq_key);
 	umtx_key_release(&uq->uq_key);
+	if (error == ERESTART)
+		error = EINTR;
 	return (error);
 }