summaryrefslogtreecommitdiffstats
path: root/security/tomoyo/securityfs_if.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2010-06-25 12:22:09 +0900
committerJames Morris <jmorris@namei.org>2010-08-02 15:34:55 +1000
commit0849e3ba53c3ef603dffa9758a73e07ed186a937 (patch)
tree5aaaa02db9be90287bfcc6e00e48d0b50c18d6cd /security/tomoyo/securityfs_if.c
parente2bf69077acefee5247bb661faac2552d29ba7ba (diff)
downloadlinux-0849e3ba53c3ef603dffa9758a73e07ed186a937.tar.bz2
TOMOYO: Add missing poll() hook.
Commit 1dae08c "TOMOYO: Add interactive enforcing mode." forgot to register poll() hook. As a result, /usr/sbin/tomoyo-queryd was doing busy loop. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/tomoyo/securityfs_if.c')
-rw-r--r--security/tomoyo/securityfs_if.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/security/tomoyo/securityfs_if.c b/security/tomoyo/securityfs_if.c
index 5eb53510c4a7..9967c1c5c713 100644
--- a/security/tomoyo/securityfs_if.c
+++ b/security/tomoyo/securityfs_if.c
@@ -38,6 +38,19 @@ static int tomoyo_release(struct inode *inode, struct file *file)
}
/**
+ * tomoyo_poll - poll() for /proc/ccs/ interface.
+ *
+ * @file: Pointer to "struct file".
+ * @wait: Pointer to "poll_table".
+ *
+ * Returns 0 on success, negative value otherwise.
+ */
+static unsigned int tomoyo_poll(struct file *file, poll_table *wait)
+{
+ return tomoyo_poll_control(file, wait);
+}
+
+/**
* tomoyo_read - read() for /sys/kernel/security/tomoyo/ interface.
*
* @file: Pointer to "struct file".
@@ -79,6 +92,7 @@ static ssize_t tomoyo_write(struct file *file, const char __user *buf,
static const struct file_operations tomoyo_operations = {
.open = tomoyo_open,
.release = tomoyo_release,
+ .poll = tomoyo_poll,
.read = tomoyo_read,
.write = tomoyo_write,
};