- selinux-fix-sb_lock-sb_security_lock-nesting-was.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     selinux: fix sb_lock/sb_security_lock nesting

has been  the -mm tree.  Its filename is

     selinux-fix-sb_lock-sb_security_lock-nesting-was.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: selinux: fix sb_lock/sb_security_lock nesting
From: Stephen Smalley <sds@xxxxxxxxxxxxx>


Fix unsafe nesting of sb_lock inside sb_security_lock in
selinux_complete_init.  Detected by the kernel locking validator.

Signed-off-by: Stephen Smalley <sds@xxxxxxxxxxxxx>
Acked-by: James Morris <jmorris@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 security/selinux/hooks.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff -puN security/selinux/hooks.c~selinux-fix-sb_lock-sb_security_lock-nesting-was security/selinux/hooks.c
--- devel/security/selinux/hooks.c~selinux-fix-sb_lock-sb_security_lock-nesting-was	2006-06-04 02:51:15.000000000 -0700
+++ devel-akpm/security/selinux/hooks.c	2006-06-04 02:51:15.000000000 -0700
@@ -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 @@ next_sb:
 				           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
_

Patches currently in -mm which might be from sds@xxxxxxxxxxxxx are

selinux-add-security-class-for-appletalk-sockets.patch
secmark-add-new-packet-controls-to-selinux.patch
lsm-add-task_setioprio-hook.patch
proc-cleanup-proc_fd_access_allowed.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux