selinux: skip bounded transition processing if the policy isn't loaded
[sfrench/cifs-2.6.git] / security / selinux / ss / services.c
index d05496deb2295a4035e4fab767fdf2315fc6ae67..8900ea5cbabf21313b870dc12978bc81d4342c40 100644 (file)
@@ -867,6 +867,9 @@ int security_bounded_transition(u32 old_sid, u32 new_sid)
        int index;
        int rc;
 
+       if (!ss_initialized)
+               return 0;
+
        read_lock(&policy_rwlock);
 
        rc = -EINVAL;