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>
This commit is contained in:
@@ -104,7 +104,7 @@ struct sem {
|
||||
/* that alter the semaphore */
|
||||
struct list_head pending_const; /* pending single-sop operations */
|
||||
/* that do not alter the semaphore*/
|
||||
time_t sem_otime; /* candidate for sem_otime */
|
||||
time64_t sem_otime; /* candidate for sem_otime */
|
||||
} ____cacheline_aligned_in_smp;
|
||||
|
||||
/* One sem_array data structure for each set of semaphores in the system. */
|
||||
@@ -984,10 +984,10 @@ again:
|
||||
static void set_semotime(struct sem_array *sma, struct sembuf *sops)
|
||||
{
|
||||
if (sops == NULL) {
|
||||
sma->sems[0].sem_otime = get_seconds();
|
||||
sma->sems[0].sem_otime = ktime_get_real_seconds();
|
||||
} else {
|
||||
sma->sems[sops[0].sem_num].sem_otime =
|
||||
get_seconds();
|
||||
ktime_get_real_seconds();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user