Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35640
b: refs/heads/master
c: bc7e982
h: refs/heads/master
v: v3
  • Loading branch information
Eric Paris authored and Linus Torvalds committed Sep 26, 2006
1 parent ba0248c commit 0c2baf1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 23970741720360de9dd0a4e87fbeb1d5927aa474
refs/heads/master: bc7e982b84aceef0a040c88ff659eb5c83818f72
7 changes: 3 additions & 4 deletions trunk/security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,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>
Expand Down Expand Up @@ -243,7 +242,7 @@ static int superblock_alloc_security(struct super_block *sb)
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);
Expand Down Expand Up @@ -595,7 +594,7 @@ static int superblock_doinit(struct super_block *sb, void *data)
struct inode *inode = root->d_inode;
int rc = 0;

down(&sbsec->sem);
mutex_lock(&sbsec->lock);
if (sbsec->initialized)
goto out;

Expand Down Expand Up @@ -690,7 +689,7 @@ static int superblock_doinit(struct super_block *sb, void *data)
}
spin_unlock(&sbsec->isec_lock);
out:
up(&sbsec->sem);
mutex_unlock(&sbsec->lock);
return rc;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/security/selinux/include/objsec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit 0c2baf1

Please sign in to comment.