• Arnd Bergmann's avatar
    nfsd: fix delay timer on 32-bit architectures · 2561c92b
    Arnd Bergmann authored
    The nfsd4_cb_layout_done() function takes a 'time_t' value,
    multiplied by NSEC_PER_SEC*2 to get a nanosecond value.
    
    This works fine on 64-bit architectures, but on 32-bit, any
    value over 1 second results in a signed integer overflow
    with unexpected results.
    
    Cast one input to a 64-bit type in order to produce the
    same result that we have on 64-bit architectures, regarless
    of the type of nfsd4_lease.
    
    Fixes: 6b9b2107 ("nfsd: give up on CB_LAYOUTRECALLs after two lease periods")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    2561c92b
nfs4layouts.c 18.6 KB