msgctl syscall in compat64 mode use 64-bit long time field similar to the native struct semid64_ds so do not copy the 32-bit lower/upper half time.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com --- ipc/msg.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/ipc/msg.c b/ipc/msg.c index a0d05775af2c..2749c182e5ba 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -695,12 +695,18 @@ static int copy_compat_msqid_to_user(void __user *buf, struct msqid64_ds *in, struct compat_msqid64_ds v; memset(&v, 0, sizeof(v)); to_compat_ipc64_perm(&v.msg_perm, &in->msg_perm); +#ifdef CONFIG_COMPAT64 + v.msg_stime = in->msg_stime; + v.msg_rtime = in->msg_rtime; + v.msg_ctime = in->msg_ctime; +#else v.msg_stime = lower_32_bits(in->msg_stime); v.msg_stime_high = upper_32_bits(in->msg_stime); v.msg_rtime = lower_32_bits(in->msg_rtime); v.msg_rtime_high = upper_32_bits(in->msg_rtime); v.msg_ctime = lower_32_bits(in->msg_ctime); v.msg_ctime_high = upper_32_bits(in->msg_ctime); +#endif v.msg_cbytes = in->msg_cbytes; v.msg_qnum = in->msg_qnum; v.msg_qbytes = in->msg_qbytes;