summaryrefslogtreecommitdiff
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2016-10-18 23:30:09 +0300
committerJ. Bruce Fields <bfields@redhat.com>2016-10-26 22:49:48 +0300
commit2876a34466ce382a76b9ffb34757bb48928ac743 (patch)
tree3ef99967d3cf3c5dc577432b73b3e4b03d43df5b /net/sunrpc/xprtsock.c
parent0cc11a61b80a1ab1d12f1597b27b8b45ef8bac4a (diff)
downloadlinux-2876a34466ce382a76b9ffb34757bb48928ac743.tar.xz
sunrpc: don't pass on-stack memory to sg_set_buf
As of ac4e97abce9b "scatterlist: sg_set_buf() argument must be in linear mapping", sg_set_buf hits a BUG when make_checksum_v2->xdr_process_buf, among other callers, passes it memory on the stack. We only need a scatterlist to pass this to the crypto code, and it seems like overkill to require kmalloc'd memory just to encrypt a few bytes, but for now this seems the best fix. Many of these callers are in the NFS write paths, so we allocate with GFP_NOFS. It might be possible to do without allocations here entirely, but that would probably be a bigger project. Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
0 files changed, 0 insertions, 0 deletions