From 911e74a39e7e66c6d92468938049224f5321aa34 Mon Sep 17 00:00:00 2001 From: zhizhimeimei6 Date: Tue, 21 Jun 2022 15:37:46 +0800 Subject: [PATCH] binder: modify transaction_proc to procfs ohos inclusion category: feature issue: #I5DD1B CVE: NA Signed-off-by: zhizhimeimei6 --- drivers/android/binder.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 153b3dbcf661..36065be1788a 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -68,6 +68,7 @@ #include #ifdef CONFIG_BINDER_TRANSACTION_PROC_BRIEF #include +#include #endif #include @@ -98,7 +99,7 @@ DEFINE_SHOW_ATTRIBUTE(proc); #ifdef CONFIG_BINDER_TRANSACTION_PROC_BRIEF static int binder_transaction_proc_show(struct seq_file *m, void *unused); -DEFINE_SHOW_ATTRIBUTE(binder_transaction_proc); +DEFINE_PROC_SHOW_ATTRIBUTE(binder_transaction_proc); #endif #define FORBIDDEN_MMAP_FLAGS (VM_WRITE) @@ -6401,11 +6402,11 @@ static int __init binder_init(void) &binder_transaction_log_failed, &binder_transaction_log_fops); #ifdef CONFIG_BINDER_TRANSACTION_PROC_BRIEF - debugfs_create_file("transaction_proc", - S_IRUGO, - binder_debugfs_dir_entry_root, - NULL, - &binder_transaction_proc_fops); + proc_create_data("transaction_proc", + S_IRUGO, + NULL, + &binder_transaction_proc_proc_ops, + NULL); #endif } -- Gitee