The patch titled SELinux: convert sbsec semaphore to a mutex has been added to the -mm tree. Its filename is selinux-3-3-convert-sbsec-semaphore-to-a-mutex.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: SELinux: convert sbsec semaphore to a mutex From: Eric Paris <eparis@xxxxxxxxxx> This patch converts the semaphore in the superblock security struct to a mutex. No locking changes or other code changes are done. Signed-off-by: Eric Paris <eparis@xxxxxxxxxx> Acked-by: Stephen Smalley <sds@xxxxxxxxxxxxx> Acked-by: James Morris <jmorris@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- security/selinux/hooks.c | 7 +++---- security/selinux/include/objsec.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff -puN security/selinux/hooks.c~selinux-3-3-convert-sbsec-semaphore-to-a-mutex security/selinux/hooks.c --- a/security/selinux/hooks.c~selinux-3-3-convert-sbsec-semaphore-to-a-mutex +++ a/security/selinux/hooks.c @@ -49,7 +49,6 @@ #include <net/ip.h> /* for sysctl_local_port_range[] */ #include <net/tcp.h> /* struct or_callable used in sock_rcv_skb */ #include <asm/uaccess.h> -#include <asm/semaphore.h> #include <asm/ioctls.h> #include <linux/bitops.h> #include <linux/interrupt.h> @@ -240,7 +239,7 @@ static int superblock_alloc_security(str if (!sbsec) return -ENOMEM; - init_MUTEX(&sbsec->sem); + mutex_init(&sbsec->lock); INIT_LIST_HEAD(&sbsec->list); INIT_LIST_HEAD(&sbsec->isec_head); spin_lock_init(&sbsec->isec_lock); @@ -595,7 +594,7 @@ static int superblock_doinit(struct supe struct inode *inode = root->d_inode; int rc = 0; - down(&sbsec->sem); + mutex_lock(&sbsec->lock); if (sbsec->initialized) goto out; @@ -690,7 +689,7 @@ next_inode: } spin_unlock(&sbsec->isec_lock); out: - up(&sbsec->sem); + mutex_unlock(&sbsec->lock); return rc; } diff -puN security/selinux/include/objsec.h~selinux-3-3-convert-sbsec-semaphore-to-a-mutex security/selinux/include/objsec.h --- a/security/selinux/include/objsec.h~selinux-3-3-convert-sbsec-semaphore-to-a-mutex +++ a/security/selinux/include/objsec.h @@ -63,7 +63,7 @@ struct superblock_security_struct { unsigned int behavior; /* labeling behavior */ unsigned char initialized; /* initialization flag */ unsigned char proc; /* proc fs */ - struct semaphore sem; + struct mutex lock; struct list_head isec_head; spinlock_t isec_lock; }; _ Patches currently in -mm which might be from eparis@xxxxxxxxxx are selinux-enable-configuration-of-max-policy-version.patch selinux-add-support-for-range-transitions-on-object.patch selinux-1-3-eliminate-inode_security_set_security.patch selinux-2-3-change-isec-semaphore-to-a-mutex.patch selinux-3-3-convert-sbsec-semaphore-to-a-mutex.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