diff options
author | Tina Ruchandani <ruchandani.tina@gmail.com> | 2017-03-16 16:27:46 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2017-03-16 16:27:46 +0000 |
commit | 56e714312e7dbd6bb83b2f78d3ec19a404c7649f (patch) | |
tree | b4025669d48f4514efbc96e65f0ac967c04c98fb /fs/afs/internal.h | |
parent | 8a79790bf0b7da216627ffb85f52cfb4adbf1e4e (diff) | |
download | linux-stable-56e714312e7dbd6bb83b2f78d3ec19a404c7649f.tar.gz linux-stable-56e714312e7dbd6bb83b2f78d3ec19a404c7649f.tar.bz2 linux-stable-56e714312e7dbd6bb83b2f78d3ec19a404c7649f.zip |
afs: Prevent callback expiry timer overflow
get_seconds() returns real wall-clock seconds. On 32-bit systems
this value will overflow in year 2038 and beyond. This patch changes
afs_vnode record to use ktime_get_real_seconds() instead, for the
fields cb_expires and cb_expires_at.
Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/internal.h')
-rw-r--r-- | fs/afs/internal.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h index 97a16ce200be..832555003d03 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -377,8 +377,8 @@ struct afs_vnode { struct rb_node server_rb; /* link in server->fs_vnodes */ struct rb_node cb_promise; /* link in server->cb_promises */ struct work_struct cb_broken_work; /* work to be done on callback break */ - time_t cb_expires; /* time at which callback expires */ - time_t cb_expires_at; /* time used to order cb_promise */ + time64_t cb_expires; /* time at which callback expires */ + time64_t cb_expires_at; /* time used to order cb_promise */ unsigned cb_version; /* callback version */ unsigned cb_expiry; /* callback expiry time */ afs_callback_type_t cb_type; /* type of callback */ |