Commit bbc7f33a authored by J. Bruce Fields's avatar J. Bruce Fields

nfsd: fix year-2038 nfs4 state problem

Someone with a weird time_t happened to notice this, it shouldn't really
manifest till 2038.  It may not be our ownly year-2038 problem.
Reported-by: default avatarAaron Pace <Aaron.Pace@alcatel-lucent.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent a97c331f
...@@ -1508,7 +1508,12 @@ unhash_session(struct nfsd4_session *ses) ...@@ -1508,7 +1508,12 @@ unhash_session(struct nfsd4_session *ses)
static int static int
STALE_CLIENTID(clientid_t *clid, struct nfsd_net *nn) STALE_CLIENTID(clientid_t *clid, struct nfsd_net *nn)
{ {
if (clid->cl_boot == nn->boot_time) /*
* We're assuming the clid was not given out from a boot
* precisely 2^32 (about 136 years) before this one. That seems
* a safe assumption:
*/
if (clid->cl_boot == (u32)nn->boot_time)
return 0; return 0;
dprintk("NFSD stale clientid (%08x/%08x) boot_time %08lx\n", dprintk("NFSD stale clientid (%08x/%08x) boot_time %08lx\n",
clid->cl_boot, clid->cl_id, nn->boot_time); clid->cl_boot, clid->cl_id, nn->boot_time);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment