diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2020-12-09 02:29:02 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-12-14 14:51:07 +0300 |
commit | 15261b9126cd5bb2ad8521da49d8f5c042d904c7 (patch) | |
tree | b892c5ef2dd2353c0c53b613d01162cb1c427352 /fs/nfs/nfs4session.h | |
parent | a1f26739ccdcc6967617998bd200dd907f7ff80a (diff) | |
download | linux-15261b9126cd5bb2ad8521da49d8f5c042d904c7.tar.xz |
xprtrdma: Fix XDRBUF_SPARSE_PAGES support
Olga K. observed that rpcrdma_marsh_req() allocates sparse pages
only when it has determined that a Reply chunk is necessary. There
are plenty of cases where no Reply chunk is needed, but the
XDRBUF_SPARSE_PAGES flag is set. The result would be a crash in
rpcrdma_inline_fixup() when it tries to copy parts of the received
Reply into a missing page.
To avoid crashing, handle sparse page allocation up front.
Until XATTR support was added, this issue did not appear often
because the only SPARSE_PAGES consumer always expected a reply large
enough to always require a Reply chunk.
Reported-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/nfs4session.h')
0 files changed, 0 insertions, 0 deletions