summaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2022-06-07 23:47:52 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-14 17:53:58 +0300
commitd0c01793097e4f8a86e2187bf7302161b21c3081 (patch)
treeca887f1243640b0c3d4c6598692658ff7cb49a46 /lib/memory-notifier-error-inject.c
parent58f2a2d14fa9ff6cf31997b7dbd094daa75eac29 (diff)
downloadlinux-d0c01793097e4f8a86e2187bf7302161b21c3081.tar.xz
SUNRPC: Fix the calculation of xdr->end in xdr_get_next_encode_buffer()
[ Upstream commit 6c254bf3b637dd4ef4f78eb78c7447419c0161d7 ] I found that NFSD's new NFSv3 READDIRPLUS XDR encoder was screwing up right at the end of the page array. xdr_get_next_encode_buffer() does not compute the value of xdr->end correctly: * The check to see if we're on the final available page in xdr->buf needs to account for the space consumed by @nbytes. * The new xdr->end value needs to account for the portion of @nbytes that is to be encoded into the previous buffer. Fixes: 2825a7f90753 ("nfsd4: allow encoding across page boundaries") Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: NeilBrown <neilb@suse.de> Reviewed-by: J. Bruce Fields <bfields@fieldses.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions