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 --- nvdebug_entry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nvdebug_entry.c') diff --git a/nvdebug_entry.c b/nvdebug_entry.c index 60fb7af..8e8266c 100644 --- a/nvdebug_entry.c +++ b/nvdebug_entry.c @@ -35,7 +35,7 @@ unsigned int g_nvdebug_devices = 0; #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) // This rewrites the struct to the proc_ops layout on newer kernels const struct proc_ops* compat_ops(const struct file_operations* ops) { - struct proc_ops new_ops; + struct proc_ops new_ops = {}; new_ops.proc_open = ops->open; new_ops.proc_read = ops->read; new_ops.proc_write = ops->write; -- cgit v1.2.2