Merge branch 'stable/for-linus-5.1' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / kernel / cred.c
index 21f4a97085b4041bcbe9b23568aec7bed935f21f..45d77284aed0a91383e71e53bfadf6dd5017f7e0 100644 (file)
@@ -760,19 +760,6 @@ bool creds_are_invalid(const struct cred *cred)
 {
        if (cred->magic != CRED_MAGIC)
                return true;
-#ifdef CONFIG_SECURITY_SELINUX
-       /*
-        * cred->security == NULL if security_cred_alloc_blank() or
-        * security_prepare_creds() returned an error.
-        */
-       if (selinux_is_enabled() && cred->security) {
-               if ((unsigned long) cred->security < PAGE_SIZE)
-                       return true;
-               if ((*(u32 *)cred->security & 0xffffff00) ==
-                   (POISON_FREE << 24 | POISON_FREE << 16 | POISON_FREE << 8))
-                       return true;
-       }
-#endif
        return false;
 }
 EXPORT_SYMBOL(creds_are_invalid);