提交 a6c5170d 编写于 作者: L Linus Torvalds

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
...@@ -1638,7 +1638,7 @@ __destroy_client(struct nfs4_client *clp) ...@@ -1638,7 +1638,7 @@ __destroy_client(struct nfs4_client *clp)
nfs4_put_stid(&dp->dl_stid); nfs4_put_stid(&dp->dl_stid);
} }
while (!list_empty(&clp->cl_revoked)) { while (!list_empty(&clp->cl_revoked)) {
dp = list_entry(reaplist.next, struct nfs4_delegation, dl_recall_lru); dp = list_entry(clp->cl_revoked.next, struct nfs4_delegation, dl_recall_lru);
list_del_init(&dp->dl_recall_lru); list_del_init(&dp->dl_recall_lru);
nfs4_put_stid(&dp->dl_stid); nfs4_put_stid(&dp->dl_stid);
} }
......
...@@ -217,6 +217,8 @@ static void gssp_free_receive_pages(struct gssx_arg_accept_sec_context *arg) ...@@ -217,6 +217,8 @@ static void gssp_free_receive_pages(struct gssx_arg_accept_sec_context *arg)
for (i = 0; i < arg->npages && arg->pages[i]; i++) for (i = 0; i < arg->npages && arg->pages[i]; i++)
__free_page(arg->pages[i]); __free_page(arg->pages[i]);
kfree(arg->pages);
} }
static int gssp_alloc_receive_pages(struct gssx_arg_accept_sec_context *arg) static int gssp_alloc_receive_pages(struct gssx_arg_accept_sec_context *arg)
......
...@@ -463,6 +463,8 @@ static int rsc_parse(struct cache_detail *cd, ...@@ -463,6 +463,8 @@ static int rsc_parse(struct cache_detail *cd,
/* number of additional gid's */ /* number of additional gid's */
if (get_int(&mesg, &N)) if (get_int(&mesg, &N))
goto out; goto out;
if (N < 0 || N > NGROUPS_MAX)
goto out;
status = -ENOMEM; status = -ENOMEM;
rsci.cred.cr_group_info = groups_alloc(N); rsci.cred.cr_group_info = groups_alloc(N);
if (rsci.cred.cr_group_info == NULL) if (rsci.cred.cr_group_info == NULL)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册