Whamcloud - gitweb
LU-12581 osc: prevent use after free
[fs/lustre-release.git] / lustre / osc / osc_request.c
index 59d6bc6..a29d49f 100644 (file)
@@ -751,6 +751,7 @@ static int osc_shrink_grant_interpret(const struct lu_env *env,
        osc_update_grant(cli, body);
 out:
        OBD_SLAB_FREE_PTR(aa->aa_oa, osc_obdo_kmem);
+       aa->aa_oa = NULL;
 
        return rc;
 }
@@ -2123,6 +2124,7 @@ static int brw_interpret(const struct lu_env *env,
                cl_object_attr_unlock(obj);
        }
        OBD_SLAB_FREE_PTR(aa->aa_oa, osc_obdo_kmem);
+       aa->aa_oa = NULL;
 
        if (lustre_msg_get_opc(req->rq_reqmsg) == OST_WRITE && rc == 0)
                osc_inc_unstable_pages(req);