summaryrefslogtreecommitdiff
path: root/source/module/monitor_kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/module/monitor_kernel.c')
-rw-r--r--source/module/monitor_kernel.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/module/monitor_kernel.c b/source/module/monitor_kernel.c
index 644da98..2ee7838 100644
--- a/source/module/monitor_kernel.c
+++ b/source/module/monitor_kernel.c
@@ -99,7 +99,13 @@ static long device_ioctl(struct file *file, unsigned int ioctl_num,
case IOCTL_PID:
printk(KERN_INFO "variable_monitor PID\n");
ret = copy_from_user(&wid, (ioctl_id *)ioctl_param, sizeof(ioctl_id));
- diag_pid(wid.id);
+ if (ret) {
+ printk(KERN_INFO "copy_from_user failed\n");
+ }
+ ret = diag_pid(wid.id);
+ if (ret) {
+ printk(KERN_INFO "diag_pid failed\n");
+ }
break;
case IOCTL_TGID:
printk(KERN_INFO "variable_monitor TGID\n");
@@ -187,6 +193,8 @@ void cleanup_module(void) {
class_destroy(watch_class);
cdev_del(watch_cdev);
unregister_chrdev_region(dev_num, 1);
+
+ cleanup_perf_event(); // just for perf test
}
MODULE_LICENSE("GPL");