aboutsummaryrefslogtreecommitdiffstats
path: root/runlist_procfs.c
diff options
context:
space:
mode:
authorJoshua Bakita <bakitajoshua@gmail.com>2023-07-03 12:44:32 -0400
committerJoshua Bakita <bakitajoshua@gmail.com>2023-07-03 12:44:32 -0400
commit073e8978334a07e0053ee08310743ddf3046d7d2 (patch)
treef73583c3ea3fd3c9416313736a697254bc866fed /runlist_procfs.c
parenta3fe3788535dd099d15e0ddca455be58e1d63156 (diff)
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
Diffstat (limited to 'runlist_procfs.c')
-rw-r--r--runlist_procfs.c4
1 files changed, 4 insertions, 0 deletions
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,
201 201
202struct file_operations preempt_tsg_file_ops = { 202struct file_operations preempt_tsg_file_ops = {
203 .write = preempt_tsg_file_write, 203 .write = preempt_tsg_file_write,
204 .llseek = default_llseek,
204}; 205};
205 206
206ssize_t disable_channel_file_write(struct file *f, const char __user *buffer, 207ssize_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,
238 239
239struct file_operations disable_channel_file_ops = { 240struct file_operations disable_channel_file_ops = {
240 .write = disable_channel_file_write, 241 .write = disable_channel_file_write,
242 .llseek = default_llseek,
241}; 243};
242 244
243ssize_t enable_channel_file_write(struct file *f, const char __user *buffer, 245ssize_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,
264 266
265struct file_operations enable_channel_file_ops = { 267struct file_operations enable_channel_file_ops = {
266 .write = enable_channel_file_write, 268 .write = enable_channel_file_write,
269 .llseek = default_llseek,
267}; 270};
268 271
269ssize_t switch_to_tsg_file_write(struct file *f, const char __user *buffer, 272ssize_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,
319 322
320struct file_operations switch_to_tsg_file_ops = { 323struct file_operations switch_to_tsg_file_ops = {
321 .write = switch_to_tsg_file_write, 324 .write = switch_to_tsg_file_write,
325 .llseek = default_llseek,
322}; 326};