lkml.org 
[lkml]   [2005]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.073 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site