Jeff Layton
8e60029f40
NFS: fix reference counting for NFSv4 callback thread
...
The reference counting for the NFSv4 callback thread stays artificially
high. When this thread comes down, it doesn't properly tear down the
svc_serv, causing a memory leak. In my testing on an older kernel on
x86_64, memory would leak out of the 8k kmalloc slab. So, we're leaking
at least a page of memory every time the thread comes down.
svc_create() creates the svc_serv with a sv_nrthreads count of 1, and
then svc_create_thread() increments that count. Whenever the callback
thread is started it has a sv_nrthreads count of 2. When coming down, it
calls svc_exit_thread() which decrements that count and if it hits 0, it
tears everything down. That never happens here since the count is always
at 2 when the thread exits.
The problem is that nfs_callback_up() should be calling svc_destroy() on
the svc_serv on both success and failure. This is how lockd_up_proto()
handles the reference counting, and doing that here fixes the leak.
Signed-off-by: Jeff Layton <jlayton@redhat.com >
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2008-02-13 23:24:04 -05:00
..
2008-02-07 08:42:26 -08:00
2008-02-08 09:22:39 -08:00
2008-02-08 09:22:39 -08:00
2008-02-08 09:22:39 -08:00
2008-02-08 09:22:40 -08:00
2008-02-08 09:22:39 -08:00
2008-02-08 09:22:40 -08:00
2008-02-07 08:42:27 -08:00
2008-02-05 09:44:13 -08:00
2008-01-24 20:40:05 -08:00
2008-01-25 15:05:47 -08:00
2007-10-18 14:37:29 -07:00
2008-02-08 09:22:34 -08:00
2008-02-08 09:22:40 -08:00
2008-02-06 23:41:22 -06:00
2008-02-05 09:44:13 -08:00
2008-02-07 08:42:27 -08:00
2007-10-22 08:13:21 -07:00
2008-02-08 09:22:40 -08:00
2008-02-05 09:44:13 -08:00
2008-02-10 01:11:44 -05:00
2008-02-08 09:22:40 -08:00
2008-02-07 08:42:28 -08:00
2008-02-08 09:22:40 -08:00
2008-02-05 09:44:13 -08:00
2008-02-06 10:41:05 -08:00
2008-02-08 09:22:36 -08:00
2008-02-05 09:44:30 -08:00
2008-02-08 09:22:40 -08:00
2008-02-07 08:42:29 -08:00
2008-02-05 09:44:14 -08:00
2008-02-08 09:22:40 -08:00
2008-02-08 09:22:44 -08:00
2008-02-10 01:09:32 -05:00
2008-02-07 10:20:31 -08:00
2008-02-07 13:45:29 -06:00
2008-02-10 18:09:36 -05:00
2008-02-07 08:42:28 -08:00
2008-02-08 09:22:40 -08:00
2008-02-13 23:24:04 -05:00
2008-02-05 09:44:20 -08:00
2007-10-18 14:37:31 -07:00
2008-02-05 09:44:14 -08:00
2008-02-05 09:44:13 -08:00
2008-02-07 08:42:29 -08:00
2008-02-08 12:42:01 +01:00
2008-02-05 09:44:20 -08:00
2008-02-07 08:42:28 -08:00
2007-10-17 08:42:56 -07:00
2008-02-05 09:44:13 -08:00
2008-02-07 08:42:28 -08:00
2008-02-13 16:21:19 -08:00
2008-02-07 11:31:46 -08:00
2008-02-07 08:42:29 -08:00
2008-02-13 16:21:20 -08:00
2008-02-08 09:22:39 -08:00
2008-02-07 08:42:26 -08:00
2008-02-13 16:21:19 -08:00
2008-02-08 09:22:33 -08:00
2007-10-17 08:43:00 -07:00
2007-10-18 14:37:22 -07:00
2008-02-07 08:42:26 -08:00
2008-02-08 09:22:30 -08:00
2007-10-19 11:53:40 -07:00
2008-02-08 09:22:41 -08:00
2007-10-19 23:21:04 +02:00
2008-02-08 09:22:30 -08:00
2007-10-19 23:21:04 +02:00
2007-10-19 23:21:04 +02:00
2008-02-08 09:22:30 -08:00
2008-01-28 10:04:46 +01:00
2008-02-06 10:41:06 -08:00
2008-02-05 09:44:14 -08:00
2008-02-08 09:22:42 -08:00
2008-01-30 13:31:46 +01:00
2008-02-08 02:09:56 +00:00
2008-02-05 09:44:07 -08:00
2008-02-06 10:41:07 -08:00
2007-07-29 17:09:29 -07:00
2008-02-05 09:44:13 -08:00
2007-07-20 10:11:58 +09:00
2008-02-06 10:41:07 -08:00
2008-02-06 10:41:03 -08:00
2008-02-05 09:44:07 -08:00
2008-02-05 09:44:07 -08:00
2008-02-08 09:22:31 -08:00
2008-02-08 09:22:31 -08:00
2008-02-06 10:41:06 -08:00
2008-02-05 09:44:19 -08:00
2008-02-07 08:42:29 -08:00
2008-02-08 09:22:22 -08:00
2008-02-06 10:41:07 -08:00
2008-02-09 11:08:33 -08:00
2008-01-28 11:38:15 +01:00
2008-02-05 14:37:15 -08:00
2008-02-08 09:22:30 -08:00
2008-02-05 09:44:13 -08:00
2008-02-08 09:22:29 -08:00
2008-01-30 13:31:46 +01:00
2007-10-25 15:18:29 -07:00
2008-02-05 09:44:13 -08:00
2008-02-08 09:22:31 -08:00
2008-02-08 09:22:44 -08:00
2008-02-08 09:22:36 -08:00
2008-02-13 16:21:19 -08:00
2008-02-06 10:41:02 -08:00
2007-10-21 02:37:25 -04:00
2008-02-07 08:42:26 -08:00
2008-02-08 09:22:36 -08:00
2007-12-06 17:39:54 -05:00
2008-02-06 10:41:09 -08:00
2007-10-10 16:55:33 -07:00
2008-02-06 10:41:03 -08:00
2008-02-10 10:27:21 -08:00
2008-02-08 09:22:44 -08:00
2008-02-05 09:44:07 -08:00
2008-02-06 10:41:03 -08:00
2008-02-05 09:44:20 -08:00