* [PATCH -mm] proc: remove pathetic ->deleted WARN_ON
@ 2007-03-13 14:31 Alexey Dobriyan
0 siblings, 0 replies; only message in thread
From: Alexey Dobriyan @ 2007-03-13 14:31 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, viro, devel
WARN_ON(de && de->deleted); is sooo unreliable. Why?
proc_lookup remove_proc_entry
=========== =================
lock_kernel();
spin_lock(&proc_subdir_lock);
[find proc entry]
spin_unlock(&proc_subdir_lock);
spin_lock(&proc_subdir_lock);
[find proc entry]
proc_get_inode
==============
WARN_ON(de && de->deleted); ...
if (!atomic_read(&de->count))
free_proc_entry(de);
else
de->deleted = 1;
So, if you have some strange oops [1], and doesn't see this WARN_ON it means
nothing.
[1] try_module_get() of module which doesn't exist, two lines below
should suffice, or not?
Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
---
fs/proc/inode.c | 2 --
1 file changed, 2 deletions(-)
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -418,8 +418,6 @@ struct inode *proc_get_inode(struct supe
{
struct inode * inode;
- WARN_ON(de && de->deleted);
-
if (de != NULL && !try_module_get(de->owner))
goto out_mod;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-13 14:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-13 14:31 [PATCH -mm] proc: remove pathetic ->deleted WARN_ON 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).