From 0bcc4f6df2d5062e68e570d4daad60a39cdb5fa8 Mon Sep 17 00:00:00 2001 From: akam kumar bharathi Date: Sat, 12 Dec 2015 03:57:06 +0530 Subject: [PATCH] LU-7274 gss_do_ctx_fini_rpc() passes an already freed request ptlrpc_request_free(req) calls either __ptlrpc_free_req_to_pool() OR ptlrpc_request_cache_free() depending on request from pool / memory. ptlrpc_req_finished()-> __ptlrpc_req_finished()->__ptlrpc_free_req() calls either __ptlrpc_free_req_to_pool() OR ptlrpc_request_cache_free() too, but depending on reference and request count. Thus its safe to removed the call to ptlrpc_request_free(req). Change-Id: Ie2dd647af6b07d2810c458707b791b71c92bc3df Signed-off-by: akam kumar bharathi Reviewed-on: http://review.whamcloud.com/17574 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond Reviewed-by: Sebastien Buisson Reviewed-by: Jeremy Filizetti Reviewed-by: Oleg Drokin --- lustre/ptlrpc/gss/gss_cli_upcall.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lustre/ptlrpc/gss/gss_cli_upcall.c b/lustre/ptlrpc/gss/gss_cli_upcall.c index 765082d..4c6a33f 100644 --- a/lustre/ptlrpc/gss/gss_cli_upcall.c +++ b/lustre/ptlrpc/gss/gss_cli_upcall.c @@ -410,10 +410,8 @@ int gss_do_ctx_fini_rpc(struct gss_cli_ctx *gctx) rc = ptlrpc_request_bufs_pack(req, LUSTRE_OBD_VERSION, SEC_CTX_FINI, NULL, ctx); - if (rc) { - ptlrpc_request_free(req); - GOTO(out_ref, rc); - } + if (rc) + GOTO(out_ref, rc); /* fix the user desc */ if (req->rq_pack_udesc) { -- 1.8.3.1