X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=procprotect.c;h=f8ab6e68236ea18bbbdbe48f1eb11081d3cfc2bb;hb=b95f21e08ca45f179b52053eb9cc410cac2bae4e;hp=42166f5b59a40c1b0a0c1b4f2f86ea3ea5a6f777;hpb=194681285be4f9c75d02cc11d83f46cd3f56cb0a;p=procprotect.git diff --git a/procprotect.c b/procprotect.c index 42166f5..f8ab6e6 100644 --- a/procprotect.c +++ b/procprotect.c @@ -293,11 +293,6 @@ static void add_entry(char *pathname) { } } - if (!once_only) { - once_only=1; - if (init_probes()==-1) - printk(KERN_CRIT "Could not install procprotect probes. Reload module to retry."); - } } @@ -339,6 +334,12 @@ int procfile_write(struct file *file, const char *buffer, unsigned long count, v pathname[count]='\0'; add_entry(pathname); + + if (!once_only) { + once_only=1; + if (init_probes()==-1) + printk(KERN_CRIT "Could not install procprotect probes. Reload module to retry."); + } printk(KERN_CRIT "Length of buffer=%d",strlen(pathname)); return count; }