Messages in this thread | | | Date | Thu, 13 Jan 2005 15:34:46 -0800 | From | Greg KH <> | Subject | Re: [PATCH] Kprobes /proc entry |
| |
On Fri, Jan 14, 2005 at 12:20:20AM +0100, Luca Falavigna wrote: > > +#ifdef CONFIG_DEBUG_FS
This ifdef should not be needed.
> +int kprobes_open(struct inode *inode, struct file *file)
Shouldn't these calls be static?
> +{ > + try_module_get(THIS_MODULE);
Check the return value of this call?
> static int __init init_kprobes(void) > { > int i, err = 0; > @@ -140,6 +233,16 @@ > for (i = 0; i < KPROBE_TABLE_SIZE; i++) > INIT_HLIST_HEAD(&kprobe_table[i]); > > +#ifdef CONFIG_DEBUG_FS
ifdef not needed.
> + if(!(kprobes_dir = debugfs_create_dir("kprobes", NULL))) > + return -ENODEV; > + if(!(kprobes_list = debugfs_create_file("list", S_IRUGO, kprobes_dir, > + NULL, &kprobes_fops))) { > + debugfs_remove(kprobes_dir); > + return -ENODEV; > + }
You never delete this file or directory on module unload, do you?
thanks,
greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |