You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
James Morris
parent
f67dabbdde
commit
6041e8346f
@@ -788,7 +788,7 @@ struct tomoyo_acl_param {
|
||||
struct tomoyo_io_buffer {
|
||||
void (*read) (struct tomoyo_io_buffer *);
|
||||
int (*write) (struct tomoyo_io_buffer *);
|
||||
int (*poll) (struct file *file, poll_table *wait);
|
||||
unsigned int (*poll) (struct file *file, poll_table *wait);
|
||||
/* Exclusive lock for this structure. */
|
||||
struct mutex io_sem;
|
||||
char __user *read_user_buf;
|
||||
@@ -981,8 +981,8 @@ int tomoyo_path_number_perm(const u8 operation, struct path *path,
|
||||
unsigned long number);
|
||||
int tomoyo_path_perm(const u8 operation, struct path *path,
|
||||
const char *target);
|
||||
int tomoyo_poll_control(struct file *file, poll_table *wait);
|
||||
int tomoyo_poll_log(struct file *file, poll_table *wait);
|
||||
unsigned int tomoyo_poll_control(struct file *file, poll_table *wait);
|
||||
unsigned int tomoyo_poll_log(struct file *file, poll_table *wait);
|
||||
int tomoyo_socket_bind_permission(struct socket *sock, struct sockaddr *addr,
|
||||
int addr_len);
|
||||
int tomoyo_socket_connect_permission(struct socket *sock,
|
||||
|
||||
Reference in New Issue
Block a user