public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 2.4.28-rc1] Avoid oops in proc_delete_inode
@ 2004-11-04  2:35 Keith Owens
  2004-11-04 15:29 ` Marc-Christian Petersen
  0 siblings, 1 reply; 4+ messages in thread
From: Keith Owens @ 2004-11-04  2:35 UTC (permalink / raw)
  To: linux-kernel; +Cc: viro, marcelo.tosatti

Under heavy load, vmstat, top and other programs that access /proc can
oops.  PROC_INODE_PROPER(inode) is sometimes false for pid entries
(usually zombies), but inode->u.generic_ip is not NULL.

Backport a fix by AL Viro from 2.5.7-pre2 to 2.4.28-rc1.

Signed-off-by: Keith Owens <kaos@sgi.com>

Index: 2.4.28-rc1/fs/proc/base.c
===================================================================
--- 2.4.28-rc1.orig/fs/proc/base.c	2004-08-08 10:10:49.000000000 +1000
+++ 2.4.28-rc1/fs/proc/base.c	2004-11-04 13:25:16.402602459 +1100
@@ -780,6 +780,7 @@ out:
 	return inode;
 
 out_unlock:
+	node->u.generic_ip = NULL;
 	iput(inode);
 	return NULL;
 }


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch 2.4.28-rc1] Avoid oops in proc_delete_inode
  2004-11-04  2:35 [patch 2.4.28-rc1] Avoid oops in proc_delete_inode Keith Owens
@ 2004-11-04 15:29 ` Marc-Christian Petersen
  2004-11-04 17:31   ` Marcelo Tosatti
  2004-11-04 20:35   ` Keith Owens
  0 siblings, 2 replies; 4+ messages in thread
From: Marc-Christian Petersen @ 2004-11-04 15:29 UTC (permalink / raw)
  To: Keith Owens; +Cc: linux-kernel, viro, marcelo.tosatti

On Thursday 04 November 2004 03:35, Keith Owens wrote:

Marcelo,

I just saw you applied this to bk. Cool, but please apply a right version ;)

> Under heavy load, vmstat, top and other programs that access /proc can
> oops.  PROC_INODE_PROPER(inode) is sometimes false for pid entries
> (usually zombies), but inode->u.generic_ip is not NULL.
>
> Backport a fix by AL Viro from 2.5.7-pre2 to 2.4.28-rc1.
>
> Signed-off-by: Keith Owens <kaos@sgi.com>
>
> Index: 2.4.28-rc1/fs/proc/base.c
> ===================================================================
> --- 2.4.28-rc1.orig/fs/proc/base.c 2004-08-08 10:10:49.000000000 +1000
> +++ 2.4.28-rc1/fs/proc/base.c 2004-11-04 13:25:16.402602459 +1100
> @@ -780,6 +780,7 @@ out:
>   return inode;
>
>  out_unlock:
> + node->u.generic_ip = NULL;

has to be:

  + inode->u.generic_ip = NULL;

>   iput(inode);
>   return NULL;
>  }

ciao, Marc

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch 2.4.28-rc1] Avoid oops in proc_delete_inode
  2004-11-04 15:29 ` Marc-Christian Petersen
@ 2004-11-04 17:31   ` Marcelo Tosatti
  2004-11-04 20:35   ` Keith Owens
  1 sibling, 0 replies; 4+ messages in thread
From: Marcelo Tosatti @ 2004-11-04 17:31 UTC (permalink / raw)
  To: Marc-Christian Petersen; +Cc: Keith Owens, linux-kernel

On Thu, Nov 04, 2004 at 04:29:17PM +0100, Marc-Christian Petersen wrote:
> On Thursday 04 November 2004 03:35, Keith Owens wrote:
> 
> Marcelo,
> 
> I just saw you applied this to bk. Cool, but please apply a right version ;)
> 
> > Under heavy load, vmstat, top and other programs that access /proc can
> > oops.  PROC_INODE_PROPER(inode) is sometimes false for pid entries
> > (usually zombies), but inode->u.generic_ip is not NULL.
> >
> > Backport a fix by AL Viro from 2.5.7-pre2 to 2.4.28-rc1.
> >
> > Signed-off-by: Keith Owens <kaos@sgi.com>
> >
> > Index: 2.4.28-rc1/fs/proc/base.c
> > ===================================================================
> > --- 2.4.28-rc1.orig/fs/proc/base.c 2004-08-08 10:10:49.000000000 +1000
> > +++ 2.4.28-rc1/fs/proc/base.c 2004-11-04 13:25:16.402602459 +1100
> > @@ -780,6 +780,7 @@ out:
> >   return inode;
> >
> >  out_unlock:
> > + node->u.generic_ip = NULL;
> 
> has to be:
> 
>   + inode->u.generic_ip = NULL;

Done, thanks.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch 2.4.28-rc1] Avoid oops in proc_delete_inode
  2004-11-04 15:29 ` Marc-Christian Petersen
  2004-11-04 17:31   ` Marcelo Tosatti
@ 2004-11-04 20:35   ` Keith Owens
  1 sibling, 0 replies; 4+ messages in thread
From: Keith Owens @ 2004-11-04 20:35 UTC (permalink / raw)
  To: Marc-Christian Petersen; +Cc: linux-kernel, marcelo.tosatti

On Thu, 4 Nov 2004 16:29:17 +0100, 
Marc-Christian Petersen <m.c.p@kernel.linux-systeme.com> wrote:
>On Thursday 04 November 2004 03:35, Keith Owens wrote:
>
>Marcelo,
>
>I just saw you applied this to bk. Cool, but please apply a right version ;)
>
>> Under heavy load, vmstat, top and other programs that access /proc can
>> oops.  PROC_INODE_PROPER(inode) is sometimes false for pid entries
>> (usually zombies), but inode->u.generic_ip is not NULL.
>>
>> Backport a fix by AL Viro from 2.5.7-pre2 to 2.4.28-rc1.
>>
>> Signed-off-by: Keith Owens <kaos@sgi.com>
>>
>> Index: 2.4.28-rc1/fs/proc/base.c
>> ===================================================================
>> --- 2.4.28-rc1.orig/fs/proc/base.c 2004-08-08 10:10:49.000000000 +1000
>> +++ 2.4.28-rc1/fs/proc/base.c 2004-11-04 13:25:16.402602459 +1100
>> @@ -780,6 +780,7 @@ out:
>>   return inode;
>>
>>  out_unlock:
>> + node->u.generic_ip = NULL;
>
>has to be:
>
>  + inode->u.generic_ip = NULL;
>
>>   iput(inode);
>>   return NULL;
>>  }

Oops, copied the old patch into the mail.  Where did I put that brown
paper bag?


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-11-04 20:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-04  2:35 [patch 2.4.28-rc1] Avoid oops in proc_delete_inode Keith Owens
2004-11-04 15:29 ` Marc-Christian Petersen
2004-11-04 17:31   ` Marcelo Tosatti
2004-11-04 20:35   ` Keith Owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox