* [PATCH 2/2] proc: warn on non-existing proc entries
@ 2010-01-20 20:39 Alexey Dobriyan
0 siblings, 0 replies; only message in thread
From: Alexey Dobriyan @ 2010-01-20 20:39 UTC (permalink / raw)
To: akpm, viro; +Cc: linux-fsdevel
* 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>
---
fs/proc/generic.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- 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;
@@ -814,8 +816,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);
/*
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-20 20:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-20 20:39 [PATCH 2/2] proc: warn on non-existing proc entries Alexey Dobriyan
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).