projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e17a576
)
proc: warn on non-existing proc entries
author
Alexey Dobriyan
<
[email protected]
>
Fri, 5 Mar 2010 21:44:00 +0000
(13:44 -0800)
committer
Linus Torvalds
<
[email protected]
>
Sat, 6 Mar 2010 19:26:45 +0000
(11:26 -0800)
* 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 <
[email protected]
>
Cc: Al Viro <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/proc/generic.c
patch
|
blob
|
history
diff --git
a/fs/proc/generic.c
b/fs/proc/generic.c
index ce2d95477701b43770c6669b0d18239561b6dcf7..08f4d71dacd7fba3e9a704cb77c9131b6d0c5d69 100644
(file)
--- 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);
/*