Whamcloud - gitweb
LU-8811 mdc: avoid returning freed request 43/23843/2
authorJohn L. Hammond <john.hammond@intel.com>
Thu, 17 Nov 2016 17:39:19 +0000 (11:39 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 17 Dec 2016 05:48:34 +0000 (05:48 +0000)
In mdc_close() if ptlrpc_request_pack() fails then set req to NULL so
that an already freed request is not returned in *request.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I7460c650b736f51d78981f8a1e50758f7acf7c77
Reviewed-on: https://review.whamcloud.com/23843
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/mdc/mdc_request.c

index 0372052..75355fd 100644 (file)
@@ -797,6 +797,7 @@ static int mdc_close(struct obd_export *exp, struct md_op_data *op_data,
        rc = ptlrpc_request_pack(req, LUSTRE_MDS_VERSION, MDS_CLOSE);
        if (rc) {
                ptlrpc_request_free(req);
+               req = NULL;
                GOTO(out, rc);
        }