LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Srinivasa Ds <srinivasa@in.ibm.com>
Cc: Frederik Deweerdt <deweerdt@free.fr>,
	Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
	jkenisto@us.ibm.com, anil.s.keshavamurthy@intel.com,
	prasanna@in.ibm.com, ananth@in.ibm.com
Subject: Re: [RFC] [PATCH] To list all active probes in the system
Date: Wed, 7 Feb 2007 14:27:17 -0800	[thread overview]
Message-ID: <20070207142717.5da4d8d4.akpm@linux-foundation.org> (raw)
In-Reply-To: <45C962C3.2020904@in.ibm.com>

On Wed, 07 Feb 2007 10:55:23 +0530
Srinivasa Ds <srinivasa@in.ibm.com> wrote:

> --- linux-2.6.20.orig/fs/debugfs/inode.c
> +++ linux-2.6.20/fs/debugfs/inode.c
> @@ -25,6 +25,7 @@
>  #include <linux/namei.h>
>  #include <linux/debugfs.h>
>  #include <linux/fsnotify.h>
> +#include <linux/kprobes.h>
>  
>  #define DEBUGFS_MAGIC	0x64626720
>  
> @@ -320,6 +321,7 @@ static int __init debugfs_init(void)
>  	retval = register_filesystem(&debug_fs_type);
>  	if (retval)
>  		subsystem_unregister(&debug_subsys);
> +	debugfs_kprobe_init();
>  	return retval;
>  }

eww.  Didn't it feel bad when you did that?


As this module has a dependency upon debugfs, I'd have thought the
approproate way of expressing that would be to run debugfs_kprobe_init()
at a lower initcall priority than debugfs_init()

> +void __kprobes debugfs_kprobe_init(void)
> +{
> +	struct dentry *dir;
> +	
> +	dir = debugfs_create_dir("kprobes", NULL);
> +	if (dir == NULL)
> +		return;
> +	debugfs_create_file("list", 0444, dir , 0 , &proc_kprobes_operations);
> +}
> +
>  __initcall(init_kprobes);

debugfs_init() already runs at core_initcall level, presumably so that
debugfs clients can use plain old module_init().

> 
> +static inline void debugfs_kprobe_init(void)
> +{
> +}

In which case we don't need this.	

  reply	other threads:[~2007-02-07 22:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-06  9:55 Srinivasa Ds
2007-02-06 10:06 ` Christoph Hellwig
2007-02-06 10:22   ` Srinivasa Ds
2007-02-06 14:47     ` Srinivasa Ds
2007-02-06 14:56       ` Frederik Deweerdt
2007-02-07  5:25         ` Srinivasa Ds
2007-02-07 22:27           ` Andrew Morton [this message]
2007-02-08 11:46             ` [RFC] [PATCH] To list all active probes in the system---Take-2 Srinivasa Ds
2007-02-09  8:03               ` Andrew Morton
2007-02-12  8:45               ` Andrew Morton
2007-02-12  9:29                 ` Ananth N Mavinakayanahalli
2007-02-06 10:13 ` [RFC] [PATCH] To list all active probes in the system Andrew Morton
2007-02-06 10:21   ` Srinivasa Ds
2007-02-06 20:36   ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070207142717.5da4d8d4.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ananth@in.ibm.com \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=deweerdt@free.fr \
    --cc=hch@infradead.org \
    --cc=jkenisto@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=prasanna@in.ibm.com \
    --cc=srinivasa@in.ibm.com \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: [RFC] [PATCH] To list all active probes in the system' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).