Merge tag 'iommu-updates-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro...
[sfrench/cifs-2.6.git] / arch / x86 / kernel / traps.c
index 492a60febb1119dcb80e29d5dd9f4b6d6914e86c..58b1f208eff5186aae3b08825f1d0581b47ba275 100644 (file)
@@ -671,15 +671,15 @@ static bool try_fixup_enqcmd_gp(void)
        if (!cpu_feature_enabled(X86_FEATURE_ENQCMD))
                return false;
 
-       pasid = current->mm->pasid;
-
        /*
         * If the mm has not been allocated a
         * PASID, the #GP can not be fixed up.
         */
-       if (!pasid_valid(pasid))
+       if (!mm_valid_pasid(current->mm))
                return false;
 
+       pasid = current->mm->pasid;
+
        /*
         * Did this thread already have its PASID activated?
         * If so, the #GP must be from something else.