From 073e8978334a07e0053ee08310743ddf3046d7d2 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Mon, 3 Jul 2023 12:44:32 -0400 Subject: Fix addressing, zero-init, and compatibility bugs in a3fe378 - Including missing dereference to finish getting the address of the control register range - Add zero-initialization to the proc_ops structure in copat_ops to insure that all intentionally unset fields remain unset - Set .llseek in all the file_operations structures, as recent kernels require this to be explictly set --- runlist_procfs.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runlist_procfs.c') diff --git a/runlist_procfs.c b/runlist_procfs.c index a0e71b0..d9ec6eb 100644 --- a/runlist_procfs.c +++ b/runlist_procfs.c @@ -201,6 +201,7 @@ ssize_t preempt_tsg_file_write(struct file *f, const char __user *buffer, struct file_operations preempt_tsg_file_ops = { .write = preempt_tsg_file_write, + .llseek = default_llseek, }; ssize_t disable_channel_file_write(struct file *f, const char __user *buffer, @@ -238,6 +239,7 @@ ssize_t disable_channel_file_write(struct file *f, const char __user *buffer, struct file_operations disable_channel_file_ops = { .write = disable_channel_file_write, + .llseek = default_llseek, }; ssize_t enable_channel_file_write(struct file *f, const char __user *buffer, @@ -264,6 +266,7 @@ ssize_t enable_channel_file_write(struct file *f, const char __user *buffer, struct file_operations enable_channel_file_ops = { .write = enable_channel_file_write, + .llseek = default_llseek, }; ssize_t switch_to_tsg_file_write(struct file *f, const char __user *buffer, @@ -319,4 +322,5 @@ ssize_t switch_to_tsg_file_write(struct file *f, const char __user *buffer, struct file_operations switch_to_tsg_file_ops = { .write = switch_to_tsg_file_write, + .llseek = default_llseek, }; -- cgit v1.2.2