summaryrefslogtreecommitdiff
path: root/include/linux/sem.h
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2017-08-02 19:51:13 -0700
committerAl Viro <viro@zeniv.linux.org.uk>2017-09-03 20:24:29 -0400
commite54d02b23c5eed3aa0ffe54e659dfe1c9084c262 (patch)
tree2851477ce36dd58453bdc0e339b9f39c2d0427f9 /include/linux/sem.h
parent50578ea97a2a352c109bd1657e667b212faf2cbb (diff)
ipc: sem: Make sem_array 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 interface 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/sem.h')
-rw-r--r--include/linux/sem.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/sem.h b/include/linux/sem.h
index be5cf2ea14ad..867f86f1a20b 100644
--- a/include/linux/sem.h
+++ b/include/linux/sem.h
@@ -4,6 +4,7 @@
#include <linux/atomic.h>
#include <linux/rcupdate.h>
#include <linux/cache.h>
+#include <linux/time64.h>
#include <uapi/linux/sem.h>
struct task_struct;
@@ -30,7 +31,7 @@ struct sem {
/* One sem_array data structure for each set of semaphores in the system. */
struct sem_array {
struct kern_ipc_perm sem_perm; /* permissions .. see ipc.h */
- time_t sem_ctime; /* create/last semctl() time */
+ time64_t sem_ctime; /* create/last semctl() time */
struct list_head pending_alter; /* pending operations */
/* that alter the array */
struct list_head pending_const; /* pending complex operations */