• T
    NFS: Add correct bounds checking to NFSv2 locks · 2116271a
    Trond Myklebust 提交于
    NFSv2 file locking currently fails the Connectathon tests, because the
    calls to the VFS locking code do not return an EINVAL error if the
    struct file_lock overflows the 32-bit boundaries.
    
    The problem is due to the fact that we occasionally call helpers from
    fs/locks.c in order to avoid RPC calls to the server when we know that a
    local process holds the lock. These helpers are, of course, always
    64-bit enabled, so EINVAL is not returned in cases when it would if
    the call had gone to the NLM code.
    
    For consistency, we therefore add support for a bounds-checking helper.
    Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
    2116271a
proc.c 16.5 KB