From: Sapan Bhatia Date: Mon, 19 Aug 2013 00:44:36 +0000 (-0400) Subject: Remove possibility of being traced in a trace handler X-Git-Tag: procprotect-0.4-1~2 X-Git-Url: http://git.onelab.eu/?p=procprotect.git;a=commitdiff_plain;h=c2ce2b394fbab7dd2b69d410f3389c59fe0368a7 Remove possibility of being traced in a trace handler --- diff --git a/procprotect.c b/procprotect.c index 74c48b9..a56c6b2 100644 --- a/procprotect.c +++ b/procprotect.c @@ -72,7 +72,7 @@ struct proc_dir_entry *proc_entry; static int run_acl(unsigned long ino) { struct acl_entry *entry; - hlist_for_each_entry_rcu(entry, + hlist_for_each_entry_rcu_notrace(entry, &procprotect_hash[ino & (HASH_SIZE-1)], hlist) { if (entry->ino==ino) { @@ -305,6 +305,8 @@ static int __init procprotect_init(void) INIT_HLIST_HEAD(&procprotect_hash[i]); } + add_entry("/proc/sysrq-trigger"); + aclqpath.name = aclpath; aclqpath.len = strnlen(aclpath, PATH_MAX); @@ -355,7 +357,6 @@ static int __init procprotect_init(void) proc_entry = proc_create("procprotect", 0644, NULL, &procprotect_fops); - add_entry("/proc/sysrq-trigger"); return ret; }