diff options
author | Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> | 2012-03-14 05:27:49 -0400 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2012-03-14 21:29:18 -0400 |
commit | 6041e8346f2165679c2184cab60db768d6a26a1d (patch) | |
tree | 2c4eb032eb851f240c1b70d1afb214a2c661b886 /security/tomoyo/common.h | |
parent | f67dabbdde1fe112dfff05d02890f1e0d54117a8 (diff) |
TOMOYO: Return appropriate value to poll().
"struct file_operations"->poll() expects "unsigned int" return value.
All files in /sys/kernel/security/tomoyo/ directory other than
/sys/kernel/security/tomoyo/query and /sys/kernel/security/tomoyo/audit should
return POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM rather than -ENOSYS.
Also, /sys/kernel/security/tomoyo/query and /sys/kernel/security/tomoyo/audit
should return POLLOUT | POLLWRNORM rather than 0 when there is no data to read.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'security/tomoyo/common.h')
-rw-r--r-- | security/tomoyo/common.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h index 9512222d5581..30fd98369700 100644 --- a/security/tomoyo/common.h +++ b/security/tomoyo/common.h | |||
@@ -788,7 +788,7 @@ struct tomoyo_acl_param { | |||
788 | struct tomoyo_io_buffer { | 788 | struct tomoyo_io_buffer { |
789 | void (*read) (struct tomoyo_io_buffer *); | 789 | void (*read) (struct tomoyo_io_buffer *); |
790 | int (*write) (struct tomoyo_io_buffer *); | 790 | int (*write) (struct tomoyo_io_buffer *); |
791 | int (*poll) (struct file *file, poll_table *wait); | 791 | unsigned int (*poll) (struct file *file, poll_table *wait); |
792 | /* Exclusive lock for this structure. */ | 792 | /* Exclusive lock for this structure. */ |
793 | struct mutex io_sem; | 793 | struct mutex io_sem; |
794 | char __user *read_user_buf; | 794 | char __user *read_user_buf; |
@@ -981,8 +981,8 @@ int tomoyo_path_number_perm(const u8 operation, struct path *path, | |||
981 | unsigned long number); | 981 | unsigned long number); |
982 | int tomoyo_path_perm(const u8 operation, struct path *path, | 982 | int tomoyo_path_perm(const u8 operation, struct path *path, |
983 | const char *target); | 983 | const char *target); |
984 | int tomoyo_poll_control(struct file *file, poll_table *wait); | 984 | unsigned int tomoyo_poll_control(struct file *file, poll_table *wait); |
985 | int tomoyo_poll_log(struct file *file, poll_table *wait); | 985 | unsigned int tomoyo_poll_log(struct file *file, poll_table *wait); |
986 | int tomoyo_socket_bind_permission(struct socket *sock, struct sockaddr *addr, | 986 | int tomoyo_socket_bind_permission(struct socket *sock, struct sockaddr *addr, |
987 | int addr_len); | 987 | int addr_len); |
988 | int tomoyo_socket_connect_permission(struct socket *sock, | 988 | int tomoyo_socket_connect_permission(struct socket *sock, |