diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-03 18:52:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-03 18:52:50 -0500 |
commit | a6c5170d1edea97c538c81e377e56c7b5c5b7e63 (patch) | |
tree | ce04e89597a9266fdf6575424eeb7a85a568c81b | |
parent | 789d7f60cdfdbef510025a2b988bba44cfcc96fe (diff) | |
parent | 76cb4be993c03bf9ec65a58b13f12c679bb041e4 (diff) |
Merge branch 'for-4.0' of git://linux-nfs.org/~bfields/linux
Pull nfsd fixes from Bruce Fields:
"Three miscellaneous bugfixes, most importantly the clp->cl_revoked
bug, which we've seen several reports of people hitting"
* 'for-4.0' of git://linux-nfs.org/~bfields/linux:
sunrpc: integer underflow in rsc_parse()
nfsd: fix clp->cl_revoked list deletion causing softlock in nfsd
svcrpc: fix memory leak in gssp_accept_sec_context_upcall
-rw-r--r-- | fs/nfsd/nfs4state.c | 2 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_rpc_upcall.c | 2 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/svcauth_gss.c | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index f6b2a09f793f..d2f2c37dc2db 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -1638,7 +1638,7 @@ __destroy_client(struct nfs4_client *clp) | |||
1638 | nfs4_put_stid(&dp->dl_stid); | 1638 | nfs4_put_stid(&dp->dl_stid); |
1639 | } | 1639 | } |
1640 | while (!list_empty(&clp->cl_revoked)) { | 1640 | while (!list_empty(&clp->cl_revoked)) { |
1641 | dp = list_entry(reaplist.next, struct nfs4_delegation, dl_recall_lru); | 1641 | dp = list_entry(clp->cl_revoked.next, struct nfs4_delegation, dl_recall_lru); |
1642 | list_del_init(&dp->dl_recall_lru); | 1642 | list_del_init(&dp->dl_recall_lru); |
1643 | nfs4_put_stid(&dp->dl_stid); | 1643 | nfs4_put_stid(&dp->dl_stid); |
1644 | } | 1644 | } |
diff --git a/net/sunrpc/auth_gss/gss_rpc_upcall.c b/net/sunrpc/auth_gss/gss_rpc_upcall.c index abbb7dcd1689..59eeed43eda2 100644 --- a/net/sunrpc/auth_gss/gss_rpc_upcall.c +++ b/net/sunrpc/auth_gss/gss_rpc_upcall.c | |||
@@ -217,6 +217,8 @@ static void gssp_free_receive_pages(struct gssx_arg_accept_sec_context *arg) | |||
217 | 217 | ||
218 | for (i = 0; i < arg->npages && arg->pages[i]; i++) | 218 | for (i = 0; i < arg->npages && arg->pages[i]; i++) |
219 | __free_page(arg->pages[i]); | 219 | __free_page(arg->pages[i]); |
220 | |||
221 | kfree(arg->pages); | ||
220 | } | 222 | } |
221 | 223 | ||
222 | static int gssp_alloc_receive_pages(struct gssx_arg_accept_sec_context *arg) | 224 | static int gssp_alloc_receive_pages(struct gssx_arg_accept_sec_context *arg) |
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 224a82f24d3c..1095be9c80ab 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c | |||
@@ -463,6 +463,8 @@ static int rsc_parse(struct cache_detail *cd, | |||
463 | /* number of additional gid's */ | 463 | /* number of additional gid's */ |
464 | if (get_int(&mesg, &N)) | 464 | if (get_int(&mesg, &N)) |
465 | goto out; | 465 | goto out; |
466 | if (N < 0 || N > NGROUPS_MAX) | ||
467 | goto out; | ||
466 | status = -ENOMEM; | 468 | status = -ENOMEM; |
467 | rsci.cred.cr_group_info = groups_alloc(N); | 469 | rsci.cred.cr_group_info = groups_alloc(N); |
468 | if (rsci.cred.cr_group_info == NULL) | 470 | if (rsci.cred.cr_group_info == NULL) |