From 21aae0b89e70a348b597771c62f19ea0d5dc5edd Mon Sep 17 00:00:00 2001 From: zy Date: Mon, 20 Nov 2023 05:31:10 -0500 Subject: [PATCH] fix bug --- source/module/monitor_kernel.c | 3 ++- source/module/monitor_kernel_lib.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/module/monitor_kernel.c b/source/module/monitor_kernel.c index c896180..0d59d0e 100644 --- a/source/module/monitor_kernel.c +++ b/source/module/monitor_kernel.c @@ -69,7 +69,8 @@ static long device_ioctl(struct file *file, unsigned int ioctl_num, printk(KERN_INFO "variable_monitor 1\n"); ret = copy_from_user(&dump_param, (ioctl_dump_param *)ioctl_param, sizeof(ioctl_dump_param)); - printk(KERN_INFO "dump_param: %d %lu %p\n", *dump_param.user_ptr_len, dump_param.user_buf_len, dump_param.user_buf); + printk(KERN_INFO "variable_monitor 2\n"); + printk(KERN_INFO "dump_param: %p %lu %p\n", dump_param.user_ptr_len, dump_param.user_buf_len, dump_param.user_buf); if (!ret) { printk(KERN_INFO "ret\n"); ret = copy_to_user_variant_buffer( diff --git a/source/module/monitor_kernel_lib.c b/source/module/monitor_kernel_lib.c index 1821b00..759f6aa 100644 --- a/source/module/monitor_kernel_lib.c +++ b/source/module/monitor_kernel_lib.c @@ -56,7 +56,6 @@ static int init_buffer(unsigned int buf_size) { } void diag_tsk(struct task_struct *p, variable_monitor_task *tsk_info,unsigned long *flags) { - int i; unsigned int nr_bt; printk(KERN_INFO "diag_tsk\n"); diag_task_brief(p, &tsk_info->task); // task brief