]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
NFS: Add correct bounds checking to NFSv2 locks
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 20 May 2008 23:34:39 +0000 (19:34 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 9 Jul 2008 16:08:40 +0000 (12:08 -0400)
commit2116271a347d1181b5497602c2bfada1de8fd53b
tree537498aa91bbe1fbbfc7f2c1e00910ca7fbc2261
parentf3d47a3a6a1484a93c8cfe1e8c8d4399c95199c7
NFS: Add correct bounds checking to NFSv2 locks

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: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/file.c
fs/nfs/proc.c
include/linux/nfs_xdr.h