OSDN Git Service

afs: Prevent callback expiry timer overflow
authorTina Ruchandani <ruchandani.tina@gmail.com>
Thu, 16 Mar 2017 16:27:46 +0000 (16:27 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:04:56 +0000 (10:04 +0100)
commit1efae6ca3418855d3106aef4d763bf2f29b4c04d
tree1fe803b76657c56d8879b3ce898a80bb83e4f3ca
parent43e68e3725df183ec3b3eeb0207d6265a96477d2
afs: Prevent callback expiry timer overflow

[ Upstream commit 56e714312e7dbd6bb83b2f78d3ec19a404c7649f ]

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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/afs/fsclient.c
fs/afs/inode.c
fs/afs/internal.h