Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 295447 Details for
Bug 432393
memory leak on size-8192 buckets with NFSV4
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch -- fix several problems with callback thread shutdown
0025-BZ-432393-NFSv4-fix-problems-with-callback-thread.patch (text/plain), 2.69 KB, created by
Jeff Layton
on 2008-02-20 20:50:07 UTC
(
hide
)
Description:
patch -- fix several problems with callback thread shutdown
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2008-02-20 20:50:07 UTC
Size:
2.69 KB
patch
obsolete
>From 0aedfc62fee16aa471b0a92b607399484180cdd9 Mon Sep 17 00:00:00 2001 >From: Jeff Layton <jlayton@redhat.com> >Date: Tue, 19 Feb 2008 13:26:57 -0500 >Subject: [PATCH] BZ#432393: NFSv4: fix problems with callback thread shutdown > >This patch fixes several problems when the NFSv4 callback thread is >shut down: > >1) The callback thread doesn't call svc_exit_thread() on shutdown and > so doesn't attempt to clean up the svc_rqst and associated info, > leading to a memory leak. The patch adds this call. > >2) The reference count of the thread stays artificially high and so > even when svc_exit_thread() is called, it doesn't actually clean > up anything. The fix there is to make sure that nfs_callback_up() > calls svc_destroy on both success and failure. > >3) The callback thread is signalled by nfs_callback_down() but the > thread never flushes this signal. This means that all of the tasks > done at thread shutdown are done with a signal pending. This leads > to some spurious error messages and problems unregistering the > port with the portmapper. >--- > fs/nfs/callback.c | 18 +++++++++++++----- > 1 files changed, 13 insertions(+), 5 deletions(-) > >diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c >index 00dbab6..db86d2c 100644 >--- a/fs/nfs/callback.c >+++ b/fs/nfs/callback.c >@@ -73,6 +73,8 @@ static void nfs_callback_svc(struct svc_rqst *rqstp) > svc_process(serv, rqstp); > } > >+ flush_signals(current); >+ svc_exit_thread(rqstp); > nfs_callback_info.pid = 0; > complete(&nfs_callback_info.stopped); > unlock_kernel(); >@@ -84,7 +86,7 @@ static void nfs_callback_svc(struct svc_rqst *rqstp) > */ > int nfs_callback_up(void) > { >- struct svc_serv *serv; >+ struct svc_serv *serv = NULL; > struct svc_sock *svsk; > int ret = 0; > >@@ -101,7 +103,7 @@ int nfs_callback_up(void) > /* FIXME: We don't want to register this socket with the portmapper */ > ret = svc_makesock(serv, IPPROTO_TCP, 0); > if (ret < 0) >- goto out_destroy; >+ goto out_err; > if (!list_empty(&serv->sv_permsocks)) { > svsk = list_entry(serv->sv_permsocks.next, > struct svc_sock, sk_list); >@@ -111,15 +113,21 @@ int nfs_callback_up(void) > BUG(); > ret = svc_create_thread(nfs_callback_svc, serv); > if (ret < 0) >- goto out_destroy; >+ goto out_err; > nfs_callback_info.serv = serv; > wait_for_completion(&nfs_callback_info.started); > out: >+ /* >+ * svc_create creates the svc_serv with sv_nrthreads == 1, and then >+ * svc_create_thread increments that. So we need to call svc_destroy >+ * on both success and failure so that the refcount is 1 when the >+ * thread exits. >+ */ >+ if (serv) >+ svc_destroy(serv); > up(&nfs_callback_sema); > unlock_kernel(); > return ret; >-out_destroy: >- svc_destroy(serv); > out_err: > nfs_callback_info.users--; > goto out; >-- >1.5.3.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 432393
:
295316
| 295447