Print this page
curzone reality check and teardown changes to use the RIGHT zone

@@ -434,10 +434,11 @@
                 resp->status = NFS3ERR_ACCES;
                 goto out1;
         }
 
         fhp = &args->what.dir;
+        ASSERT3P(curzone, ==, exi->exi_zone); /* exi is guaranteed non-NULL. */
         if (strcmp(args->what.name, "..") == 0 &&
             EQFID(&exi->exi_fid, FH3TOFIDP(fhp))) {
                 if ((exi->exi_export.ex_flags & EX_NOHIDE) &&
                     ((dvp->v_flag & VROOT) || VN_IS_CURZONEROOT(dvp))) {
                         /*

@@ -1323,10 +1324,11 @@
         if (vp == NULL) {
                 error = ESTALE;
                 goto err;
         }
 
+        ASSERT3P(curzone, ==, exi->exi_zone); /* exi is guaranteed non-NULL. */
         ns = zone_getspecific(rfs3_zone_key, curzone);
         if (is_system_labeled()) {
                 bslabel_t *clabel = req->rq_label;
 
                 ASSERT(clabel != NULL);

@@ -4123,10 +4125,11 @@
         if (vp == NULL) {
                 error = ESTALE;
                 goto out;
         }
 
+        ASSERT3P(curzone, ==, exi->exi_zone); /* exi is guaranteed non-NULL. */
         ns = zone_getspecific(rfs3_zone_key, curzone);
         bva.va_mask = AT_ALL;
         error = VOP_GETATTR(vp, &bva, 0, cr, NULL);
 
         /*