From 63632c7b95d204cb077d999e32690a2cdcba1327 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Tue, 1 Mar 2011 14:49:59 +0000 Subject: rpcsvc: safe mem_put of req in nfs_rpcsvc_submit_vectors Signed-off-by: Anand Avati Signed-off-by: Anand V. Avati BUG: 2481 (Crash in NFS) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2481 --- xlators/nfs/lib/src/rpcsvc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xlators/nfs') diff --git a/xlators/nfs/lib/src/rpcsvc.c b/xlators/nfs/lib/src/rpcsvc.c index cd9733ecb6e..515e8738fc9 100644 --- a/xlators/nfs/lib/src/rpcsvc.c +++ b/xlators/nfs/lib/src/rpcsvc.c @@ -1783,6 +1783,7 @@ nfs_rpcsvc_submit_vectors (rpcsvc_request_t *req) struct iobuf *replyiob = NULL; struct iovec recordhdr = {0, }; rpcsvc_txbuf_t *rpctxb = NULL; + void *rxpool = NULL; if ((!req) || (!req->conn)) return -1; @@ -1818,11 +1819,13 @@ disconnect_exit: * response to the ref that is performed on the conn when a request is * handed to the RPC program. */ + rxpool = req->conn->rxpool; + nfs_rpcsvc_conn_unref (req->conn); if (ret == -1) iobuf_unref (replyiob); - mem_put (req->conn->rxpool, req); + mem_put (rxpool, req); return ret; } -- cgit