OpenVZ Forum


Home » Mailing lists » Devel » [PATCH -mm] proc: remove pathetic ->deleted WARN_ON
[PATCH -mm] proc: remove pathetic ->deleted WARN_ON [message #11102] Tue, 13 March 2007 14:23
Alexey Dobriyan is currently offline  Alexey Dobriyan
Messages: 195
Registered: August 2006
Senior Member
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;
Previous Topic: [PATCH 0/2] resource control file system - aka containers on top of nsproxy!
Next Topic: Re: [Fwd: DELIVERY FAILURE: 554 Service unavailable; Client host [32.97.110.153] blocked using black
Goto Forum:
  


Current Time: Sun Dec 08 10:19:07 GMT 2024

Total time taken to generate the page: 0.02580 seconds