]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Introduce new-style XDR decoding functions for NFSv2
authorChuck Lever <chuck.lever@oracle.com>
Tue, 14 Dec 2010 14:55:10 +0000 (14:55 +0000)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 16 Dec 2010 17:37:21 +0000 (12:37 -0500)
commit939237a7a4bdb665cb212c8ac91e496cb029e386
tree80d62906e65bda8fb82b3b9c76a56a2071e99a7e
parent92549cdd5c744b40b2efd34bbc1a164d0ebd3807
NFS: Introduce new-style XDR decoding functions for NFSv2

We'd like to prevent local buffer overflows caused by malicious or
broken servers.  New xdr_stream style decoders can do that.

For efficiency, we also eventually want to be able to pass xdr_streams
from call_decode() to all XDR decoding functions, rather than building
an xdr_stream in every XDR decoding function in the kernel.

nfs_decode_dirent() is renamed to follow the naming convention of the
other two dirent decoders.

Static helper functions are left without the "inline" directive.  This
allows the compiler to choose automatically how to optimize these for
size or speed.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/internal.h
fs/nfs/nfs2xdr.c
fs/nfs/proc.c