From 0849e3ba53c3ef603dffa9758a73e07ed186a937 Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Fri, 25 Jun 2010 12:22:09 +0900 Subject: 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 Signed-off-by: James Morris --- security/tomoyo/common.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'security/tomoyo/common.c') diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c index 65c18af3ffe..bff63929e53 100644 --- a/security/tomoyo/common.c +++ b/security/tomoyo/common.c @@ -1897,6 +1897,23 @@ int tomoyo_open_control(const u8 type, struct file *file) return 0; } +/** + * tomoyo_poll_control - poll() for /sys/kernel/security/tomoyo/ interface. + * + * @file: Pointer to "struct file". + * @wait: Pointer to "poll_table". + * + * Waits for read readiness. + * /sys/kernel/security/tomoyo/query is handled by /usr/sbin/tomoyo-queryd . + */ +int tomoyo_poll_control(struct file *file, poll_table *wait) +{ + struct tomoyo_io_buffer *head = file->private_data; + if (!head->poll) + return -ENOSYS; + return head->poll(file, wait); +} + /** * tomoyo_read_control - read() for /sys/kernel/security/tomoyo/ interface. * -- cgit v1.2.3-70-g09d2