summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-09-17 02:00:26 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2016-09-17 02:00:26 +0200
commit87ee1280ff80e04adf9b36361235eef76cd80301 (patch)
tree1dd85b1ad234780afabc7a25feac686b11a21fef /net
parentMerge tag 'drm-fixes-for-4.8-rc6' of git://people.freedesktop.org/~airlied/linux (diff)
parentsvcauth_gss: Revert 64c59a3726f2 ("Remove unnecessary allocation") (diff)
downloadlinux-87ee1280ff80e04adf9b36361235eef76cd80301.tar.xz
linux-87ee1280ff80e04adf9b36361235eef76cd80301.zip
Merge tag 'nfsd-4.8-2' of git://linux-nfs.org/~bfields/linux
Pull nfsd bugfix from Bruce Fields: "Fix a memory corruption bug that I introduced in 4.7" * tag 'nfsd-4.8-2' of git://linux-nfs.org/~bfields/linux: svcauth_gss: Revert 64c59a3726f2 ("Remove unnecessary allocation")
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/auth_gss/svcauth_gss.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
index 1d281816f2bf..d8582028b346 100644
--- a/net/sunrpc/auth_gss/svcauth_gss.c
+++ b/net/sunrpc/auth_gss/svcauth_gss.c
@@ -569,9 +569,10 @@ gss_svc_searchbyctx(struct cache_detail *cd, struct xdr_netobj *handle)
struct rsc *found;
memset(&rsci, 0, sizeof(rsci));
- rsci.handle.data = handle->data;
- rsci.handle.len = handle->len;
+ if (dup_to_netobj(&rsci.handle, handle->data, handle->len))
+ return NULL;
found = rsc_lookup(cd, &rsci);
+ rsc_free(&rsci);
if (!found)
return NULL;
if (cache_check(cd, &found->h, NULL))