]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd4: fix encoding of out-of-space replies
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 7 Mar 2014 01:39:29 +0000 (20:39 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 27 May 2014 15:09:08 +0000 (11:09 -0400)
commit202804e68b36f3f04ad36aef92fc14f6ec46a3b1
tree3c400bbbe4c453f6b1d5afddf3d7bfae77e81daa
parent273fcd665edb4c356e00e951c3875581f7258493
nfsd4: fix encoding of out-of-space replies

If nfsd4_check_resp_size() returns an error then we should really be
truncating the reply here, otherwise we may leave extra garbage at the
end of the rpc reply.

Also add a warning to catch any cases where our reply-size estimates may
be wrong in the case of a non-idempotent operation.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4proc.c
fs/nfsd/nfs4xdr.c
fs/nfsd/xdr4.h