mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Alexey Dobriyan <adobriyan@sw.ru>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, devel@openvz.org
Subject: Re: [PATCH 2/4] proc: detect duplicate names on registration
Date: Fri, 16 Nov 2007 08:45:26 -0800	[thread overview]
Message-ID: <20071116084526.81569440.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20071116150839.GD19517@localhost.sw.ru>

On Fri, 16 Nov 2007 18:08:40 +0300 Alexey Dobriyan wrote:

> Andrew, please drop procfs-detect-duplicate-names.patch and apply this
> instead.
> ------------
> [PATCH] proc: detect duplicate names on registration
> 
> From: Zhang Rui <rui.zhang@intel.com>
> 
> Print a warning if PDE is registered with a name which already exists in
> target directory.
> 
> Bug report and a simple fix can be found here:
> http://bugzilla.kernel.org/show_bug.cgi?id=8798
> 
> [\n fixlet and no undescriptive variable usage --adobriyan]
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
> ---
> 
>  fs/proc/generic.c |   10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> --- a/fs/proc/generic.c
> +++ b/fs/proc/generic.c

> @@ -536,6 +537,15 @@ static int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dp
>  	}
>  
>  	spin_lock(&proc_subdir_lock);
> +
> +	for (tmp = dir->subdir; tmp; tmp = tmp->next)
> +		if (strcmp(tmp->name, dp->name) == 0) {
> +			printk(KERN_WARNING "PDE '%s' already registered\n",
> +				dp->name);
> +			dump_stack();
> +			break;
> +		}
> +

Please just s/PDE/proc_dir_entry/.

---
~Randy

      reply	other threads:[~2007-11-16 16:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-16 15:08 Alexey Dobriyan
2007-11-16 16:45 ` Randy Dunlap [this message]

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=20071116084526.81569440.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=adobriyan@sw.ru \
    --cc=akpm@osdl.org \
    --cc=devel@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®