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")
Unified · Split
| @@ -569,9 +569,10 @@ gss_svc_searchbyctx(struct cache_detail *cd, struct xdr_netobj *handle) · 568 unmodified lines | |||
| 569 | struct rsc *found; | 569 | struct rsc *found; |
| 570 | 570 | ||
| 571 | memset(&rsci, 0, sizeof(rsci)); | 571 | memset(&rsci, 0, sizeof(rsci)); |
| 572 | rsci.handle.data = handle->data; | 572 | if (dup_to_netobj(&rsci.handle, handle->data, handle->len)) |
| 573 | rsci.handle.len = handle->len; | 573 | return NULL; |
| 574 | found = rsc_lookup(cd, &rsci); | 574 | found = rsc_lookup(cd, &rsci); |
| 575 | rsc_free(&rsci); | ||
| 575 | if (!found) | 576 | if (!found) |
| 576 | return NULL; | 577 | return NULL; |
| 577 | if (cache_check(cd, &found->h, NULL)) | 578 | if (cache_check(cd, &found->h, NULL)) |