diff --git a/[refs] b/[refs] index e4305bbf5f09..e829d93237d3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 33043cbb9fd49a957089f5948fe814764d7abbd6 +refs/heads/master: e5a3b95f581da62e2054ef79d3be2d383e9ed664 diff --git a/trunk/security/tomoyo/common.c b/trunk/security/tomoyo/common.c index 8bedfb1992e5..92cea656ad21 100644 --- a/trunk/security/tomoyo/common.c +++ b/trunk/security/tomoyo/common.c @@ -2177,6 +2177,10 @@ static int __init tomoyo_initerface_init(void) { struct dentry *tomoyo_dir; + /* Don't create securityfs entries unless registered. */ + if (current_cred()->security != &tomoyo_kernel_domain) + return 0; + tomoyo_dir = securityfs_create_dir("tomoyo", NULL); tomoyo_create_entry("domain_policy", 0600, tomoyo_dir, TOMOYO_DOMAINPOLICY);