xprtrdma: Harden backchannel call decoding
Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:

committed by
Anna Schumaker

parent
96f8778f70
commit
41c8f70f5a
@@ -239,6 +239,19 @@ extern unsigned int xdr_read_pages(struct xdr_stream *xdr, unsigned int len);
|
||||
extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len);
|
||||
extern int xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len, int (*actor)(struct scatterlist *, void *), void *data);
|
||||
|
||||
/**
|
||||
* xdr_stream_remaining - Return the number of bytes remaining in the stream
|
||||
* @xdr: pointer to struct xdr_stream
|
||||
*
|
||||
* Return value:
|
||||
* Number of bytes remaining in @xdr before xdr->end
|
||||
*/
|
||||
static inline size_t
|
||||
xdr_stream_remaining(const struct xdr_stream *xdr)
|
||||
{
|
||||
return xdr->nwords << 2;
|
||||
}
|
||||
|
||||
ssize_t xdr_stream_decode_string_dup(struct xdr_stream *xdr, char **str,
|
||||
size_t maxlen, gfp_t gfp_flags);
|
||||
/**
|
||||
|
Reference in New Issue
Block a user