NFS: rpc_release_task leak in pre-patch-2.2.2-4...

Trond Myklebust (trond.myklebust@fys.uio.no)
17 Feb 1999 18:24:26 +0100


Hi,

I think Alan may have inadvertently mixed in a tiny part of my 8k
wsize patch together with his lockd cookie fixes in pre-patch-2.2.2-4:
namely the part removing a set of 'rpc_release_task' statements in
lockd. Please apply the following patch in order to reverse this
unwanted effect, as the necessary support in the sunrpc layer (and
fixes to the NFS code) has not been merged in.

Cheers,
Trond

diff -urN linux-2.2.2-0.4/fs/lockd/clntproc.c linux/fs/lockd/clntproc.c
--- linux-2.2.2-0.4/fs/lockd/clntproc.c Wed Feb 17 17:58:31 1999
+++ linux/fs/lockd/clntproc.c Wed Feb 17 18:02:48 1999
@@ -478,7 +478,7 @@
int status = req->a_res.status;

if (RPC_ASSASSINATED(task))
- return;
+ goto die;

if (task->tk_status < 0) {
dprintk("lockd: unlock failed (err = %d)\n", -task->tk_status);
@@ -490,6 +490,9 @@
&& status != NLM_LCK_DENIED_GRACE_PERIOD) {
printk("lockd: unexpected unlock status: %d\n", status);
}
+
+die:
+ rpc_release_task(task);
}

/*
@@ -565,6 +568,7 @@
}

die:
+ rpc_release_task(task);
nlm_release_host(req->a_host);
kfree(req);
return;
diff -urN linux-2.2.2-0.4/fs/lockd/svclock.c linux/fs/lockd/svclock.c
--- linux-2.2.2-0.4/fs/lockd/svclock.c Wed Feb 17 17:58:31 1999
+++ linux/fs/lockd/svclock.c Wed Feb 17 18:05:20 1999
@@ -561,6 +561,7 @@
block->b_incall = 0;

nlm_release_host(call->a_host);
+ rpc_release_task(task);
}

/*
diff -urN linux-2.2.2-0.4/fs/lockd/svcproc.c linux/fs/lockd/svcproc.c
--- linux-2.2.2-0.4/fs/lockd/svcproc.c Wed Feb 17 17:58:31 1999
+++ linux/fs/lockd/svcproc.c Wed Feb 17 18:05:58 1999
@@ -492,6 +492,7 @@
task->tk_pid, -task->tk_status);
}
nlm_release_host(call->a_host);
+ rpc_release_task(task);
kfree(call);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/