diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-04-12 15:19:44 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2018-04-20 16:20:18 +0200 |
commit | 2a70b7879b84d471fd0e440f027bba310e0c1fb7 (patch) | |
tree | ffb63998dfdb5fdd2636874299c9785c1271ee71 /ipc/msg.c | |
parent | y2038: xtensa: Extend sysvipc data structures (diff) | |
download | linux-2a70b7879b84d471fd0e440f027bba310e0c1fb7.tar.xz linux-2a70b7879b84d471fd0e440f027bba310e0c1fb7.zip |
y2038: ipc: Use ktime_get_real_seconds consistently
In some places, we still used get_seconds() instead of
ktime_get_real_seconds(), and I'm changing the remaining ones now to
all use ktime_get_real_seconds() so we use the full available range for
timestamps instead of overflowing the 'unsigned long' return value in
year 2106 on 32-bit kernels.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'ipc/msg.c')
-rw-r--r-- | ipc/msg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ipc/msg.c b/ipc/msg.c index 56fd1c73eedc..574f76c9a2ff 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -758,7 +758,7 @@ static inline int pipelined_send(struct msg_queue *msq, struct msg_msg *msg, WRITE_ONCE(msr->r_msg, ERR_PTR(-E2BIG)); } else { ipc_update_pid(&msq->q_lrpid, task_pid(msr->r_tsk)); - msq->q_rtime = get_seconds(); + msq->q_rtime = ktime_get_real_seconds(); wake_q_add(wake_q, msr->r_tsk); WRITE_ONCE(msr->r_msg, msg); @@ -859,7 +859,7 @@ static long do_msgsnd(int msqid, long mtype, void __user *mtext, } ipc_update_pid(&msq->q_lspid, task_tgid(current)); - msq->q_stime = get_seconds(); + msq->q_stime = ktime_get_real_seconds(); if (!pipelined_send(msq, msg, &wake_q)) { /* no one is waiting for this message, enqueue it */ @@ -1087,7 +1087,7 @@ static long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, in list_del(&msg->m_list); msq->q_qnum--; - msq->q_rtime = get_seconds(); + msq->q_rtime = ktime_get_real_seconds(); ipc_update_pid(&msq->q_lrpid, task_tgid(current)); msq->q_cbytes -= msg->m_ts; atomic_sub(msg->m_ts, &ns->msg_bytes); |