diff options
| author | John Stultz <johnstul@us.ibm.com> | 2010-03-22 17:18:36 -0700 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2010-04-27 17:32:26 +0200 |
| commit | 6f91ea55dfbe1b571542723bf8423e897f68b2c1 (patch) | |
| tree | 13dc3d9752f81af60c214a8d62ad26ab7fdd749b /security | |
| parent | e48c15434b82de9a3f597f02ea2257ca22d44d9f (diff) | |
| download | lwn-6f91ea55dfbe1b571542723bf8423e897f68b2c1.tar.gz lwn-6f91ea55dfbe1b571542723bf8423e897f68b2c1.zip | |
fs-files_list-improve
Lock tty_files with a new spinlock, tty_files_lock; provide helpers to
manipulate the per-sb files list; unexport the files_lock spinlock.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'security')
| -rw-r--r-- | security/selinux/hooks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 9a2ee845e9d4..f013de205ea8 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -2246,7 +2246,7 @@ static inline void flush_unauthorized_files(const struct cred *cred, tty = get_current_tty(); if (tty) { - file_list_lock(); + spin_lock(&tty_files_lock); if (!list_empty(&tty->tty_files)) { struct inode *inode; @@ -2262,7 +2262,7 @@ static inline void flush_unauthorized_files(const struct cred *cred, drop_tty = 1; } } - file_list_unlock(); + spin_unlock(&tty_files_lock); tty_kref_put(tty); } /* Reset controlling tty. */ |
