]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: Fix another issue with MIC buffer space
authorChuck Lever <chuck.lever@oracle.com>
Fri, 15 Nov 2019 13:39:07 +0000 (08:39 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 18 Nov 2019 10:05:42 +0000 (11:05 +0100)
commit26836b9450400b06596f2a05a7d0a79fca9ae677
tree3c27ab2d610dc791614d7eb7e9aea7d354678bb6
parent44ae2c8e3bce2099ae61219fdf5fe86a2f9c1920
SUNRPC: Fix another issue with MIC buffer space

xdr_shrink_pagelen() BUG's when @len is larger than buf->page_len.
This can happen when xdr_buf_read_mic() is given an xdr_buf with
a small page array (like, only a few bytes).

Instead, just cap the number of bytes that xdr_shrink_pagelen()
will move.

Fixes: d2aa46240b7 ("SUNRPC: Fix buffer handling of GSS MIC ... ")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/xdr.c