SUNRPC: Fix xdr_encode_bool()
authorChuck Lever <chuck.lever@oracle.com>
Tue, 19 Jul 2022 13:18:35 +0000 (09:18 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:40:05 +0000 (11:40 +0200)
commitd3c262f584dff64e6fe963acdbed0acdf165da63
treeccbd956ccad565f40d97ba43958454503787c431
parent63e921d4edb3adc9e64ed4879ca41a5bda3d4e32
SUNRPC: Fix xdr_encode_bool()

commit c770f31d8f580ed4b965c64f924ec1cc50e41734 upstream.

I discovered that xdr_encode_bool() was returning the same address
that was passed in the @p parameter. The documenting comment states
that the intent is to return the address of the next buffer
location, just like the other "xdr_encode_*" helpers.

The result was the encoded results of NFSv3 PATHCONF operations were
not formed correctly.

Fixes: ded04a587f6c ("NFSD: Update the NFSv3 PATHCONF3res encoder to use struct xdr_stream")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/sunrpc/xdr.h