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:07:24 +0000 (10:07 +0100)
commit9329ae4cb10e2563b8ec15a3d6a2a15dfe16fd3d
treea6b02e2a01d95cb764c0e53fbe924ce2fa089b92
parent7da1b85a75d4dd9b090a242ea162f27d2aea7518
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