From 3883294b8360fcda11e0cbba3a7f82b11c6e7ccb Mon Sep 17 00:00:00 2001 From: Stephen Smalley Date: Sun, 4 Jun 2006 02:51:30 -0700 Subject: [PATCH] --- yaml --- r: 27101 b: refs/heads/master c: ba0c19ed6a61a96d4b42b81cb19d4bc81b5f728c h: refs/heads/master i: 27099: 544662842076bc5477ad10880ce3dd20a326b1dd v: v3 --- [refs] | 2 +- trunk/security/selinux/hooks.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index c5ec94d1c554..6342e497d9ec 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 93ff66bf1ef29881dffd6fdc344555dab03cdb42 +refs/heads/master: ba0c19ed6a61a96d4b42b81cb19d4bc81b5f728c diff --git a/trunk/security/selinux/hooks.c b/trunk/security/selinux/hooks.c index 21dad415b896..90b4cdc0c948 100644 --- a/trunk/security/selinux/hooks.c +++ b/trunk/security/selinux/hooks.c @@ -4422,6 +4422,7 @@ void selinux_complete_init(void) /* Set up any superblocks initialized prior to the policy load. */ printk(KERN_INFO "SELinux: Setting up existing superblocks.\n"); + spin_lock(&sb_lock); spin_lock(&sb_security_lock); next_sb: if (!list_empty(&superblock_security_head)) { @@ -4430,19 +4431,20 @@ void selinux_complete_init(void) struct superblock_security_struct, list); struct super_block *sb = sbsec->sb; - spin_lock(&sb_lock); sb->s_count++; - spin_unlock(&sb_lock); spin_unlock(&sb_security_lock); + spin_unlock(&sb_lock); down_read(&sb->s_umount); if (sb->s_root) superblock_doinit(sb, NULL); drop_super(sb); + spin_lock(&sb_lock); spin_lock(&sb_security_lock); list_del_init(&sbsec->list); goto next_sb; } spin_unlock(&sb_security_lock); + spin_unlock(&sb_lock); } /* SELinux requires early initialization in order to label