summaryrefslogtreecommitdiffstats
path: root/include/linux/msg.h
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2017-08-02 19:51:12 -0700
committerAl Viro <viro@zeniv.linux.org.uk>2017-09-03 20:21:24 -0400
commit50578ea97a2a352c109bd1657e667b212faf2cbb (patch)
tree7a242252edae5c64837daa28d9d008b18c2b445c /include/linux/msg.h
parentb9047726386bb538cf5e4f52a9f04eb556eebc67 (diff)
downloadlinux-50578ea97a2a352c109bd1657e667b212faf2cbb.tar.gz
linux-50578ea97a2a352c109bd1657e667b212faf2cbb.tar.bz2
linux-50578ea97a2a352c109bd1657e667b212faf2cbb.zip
ipc: msg: Make msg_queue timestamps y2038 safe
time_t is not y2038 safe. Replace all uses of time_t by y2038 safe time64_t. Similarly, replace the calls to get_seconds() with y2038 safe ktime_get_real_seconds(). Note that this preserves fast access on 64 bit systems, but 32 bit systems need sequence counters. The syscall interfaces themselves are not changed as part of the patch. They will be part of a different series. Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/msg.h')
-rw-r--r--include/linux/msg.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/msg.h b/include/linux/msg.h
index 4e5ec3cbf464..05115342daa3 100644
--- a/include/linux/msg.h
+++ b/include/linux/msg.h
@@ -2,6 +2,7 @@
#define _LINUX_MSG_H
#include <linux/list.h>
+#include <linux/time64.h>
#include <uapi/linux/msg.h>
/* one msg_msg structure for each message */
@@ -17,9 +18,9 @@ struct msg_msg {
/* one msq_queue structure for each present queue on the system */
struct msg_queue {
struct kern_ipc_perm q_perm;
- time_t q_stime; /* last msgsnd time */
- time_t q_rtime; /* last msgrcv time */
- time_t q_ctime; /* last change time */
+ time64_t q_stime; /* last msgsnd time */
+ time64_t q_rtime; /* last msgrcv time */
+ time64_t q_ctime; /* last change time */
unsigned long q_cbytes; /* current number of bytes on queue */
unsigned long q_qnum; /* number of messages in queue */
unsigned long q_qbytes; /* max number of bytes on queue */