Linux s390 Architecture development
 help / color / mirror / Atom feed
* [CRIU][PATCH 3/7] criu/files: Fix wait_fds_event() for 64 bit platforms
@ 2017-06-28 16:12 Michael Holzheu
  0 siblings, 0 replies; only message in thread
From: Michael Holzheu @ 2017-06-28 16:12 UTC (permalink / raw)
  To: linux-s390

The htole64() function returns a 64 bit value. This is stored in
a 32 bit integer in wait_fds_event() which results in 0 for big-endian
64 bit platforms. The fuxtex() system call also requires 32 bit values.

Fix this and use htole32() also for 64 bit platforms.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
---
 criu/files.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/criu/files.c b/criu/files.c
index a36eb36..bad6069 100644
--- a/criu/files.c
+++ b/criu/files.c
@@ -193,11 +193,8 @@ void wait_fds_event(void)
 {
 	futex_t *f = &current->task_st;
 	int value;
-#if BITS_PER_LONG == 64
-	value = htole64(FDS_EVENT);
-#else
+
 	value = htole32(FDS_EVENT);
-#endif
 	futex_wait_if_cond(f, value, &);
 	clear_fds_event();
 }
-- 
2.7.4

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

only message in thread, other threads:[~2017-06-28 16:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-28 16:12 [CRIU][PATCH 3/7] criu/files: Fix wait_fds_event() for 64 bit platforms Michael Holzheu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox