From: David Miller <davem@davemloft.net>
To: w.sang@pengutronix.de
Cc: linux-ide@vger.kernel.org, bzolnier@gmail.com
Subject: Re: WARNINGs because of ide-proc handling
Date: Fri, 03 Sep 2010 07:35:03 -0700 (PDT) [thread overview]
Message-ID: <20100903.073503.191401190.davem@davemloft.net> (raw)
In-Reply-To: <20100903.053437.68134749.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Fri, 03 Sep 2010 05:34:37 -0700 (PDT)
> From: Wolfram Sang <w.sang@pengutronix.de>
> Date: Fri, 3 Sep 2010 07:53:28 +0200
>
>>
>>> Thanks for your analysis and suggested patch, I'll take a look at this.
>>
>> Thanks for your help. If we can't find something, I'll just do a bisect this
>> weekend.
>
> Frankly, at this point, I'm beginning suspect that the procfs stuff
> simply never warned at some point in the past and that the IDE
> code has had this problem for a while.
I just confirmed that the procfs code only started warning on removal
of non-present entries this past March, so basically the IDE code has
silently had this problem of not actually creating any of it's procfs
nodes for some time now.
Wolfram I'll look into your patch some more and integrate it, thanks.
commit 12bac0d9f4dbf3445a0319beee848d15fa32775e
Author: Alexey Dobriyan <adobriyan@gmail.com>
Date: Fri Mar 5 13:44:00 2010 -0800
proc: warn on non-existing proc entries
* warn if creation goes on to non-existent directory
* warn if removal goes on from non-existing directory
* warn if non-existing proc entry is removed
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index ce2d954..08f4d71 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -312,8 +312,10 @@ static int __xlate_proc_name(const char *name, struct proc_dir_entry **ret,
if (proc_match(len, cp, de))
break;
}
- if (!de)
+ if (!de) {
+ WARN(1, "name '%s'\n", name);
return -ENOENT;
+ }
cp += len + 1;
}
*residual = cp;
@@ -818,8 +820,10 @@ void remove_proc_entry(const char *name, struct proc_dir_entry *parent)
}
}
spin_unlock(&proc_subdir_lock);
- if (!de)
+ if (!de) {
+ WARN(1, "name '%s'\n", name);
return;
+ }
spin_lock(&de->pde_unload_lock);
/*
next prev parent reply other threads:[~2010-09-03 14:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-31 20:56 WARNINGs because of ide-proc handling Wolfram Sang
2010-09-02 2:33 ` David Miller
2010-09-02 21:28 ` Wolfram Sang
2010-09-02 22:14 ` David Miller
2010-09-03 5:53 ` Wolfram Sang
2010-09-03 12:34 ` David Miller
2010-09-03 14:21 ` Bartlomiej Zolnierkiewicz
2010-09-03 14:35 ` David Miller [this message]
2010-09-03 14:47 ` Wolfram Sang
2010-09-03 18:59 ` Wolfram Sang
2010-09-14 4:17 ` David Miller
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=20100903.073503.191401190.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=w.sang@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).