* [patch] fix inode leak in xfs_iget_core()
@ 2008-02-23 6:19 David Chinner
2008-02-23 9:22 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: David Chinner @ 2008-02-23 6:19 UTC (permalink / raw)
To: xfs-dev; +Cc: xfs-oss
If the radix_tree_preload() fails, we need to destroy the
inode we just read in before trying again. This could leak
xfs_vnode structures when there is memory pressure. Noticed
by Christoph Hellwig.
Signed-off-by: Dave Chinner <dgc@sgi.com>
---
fs/xfs/xfs_iget.c | 1 +
1 file changed, 1 insertion(+)
Index: 2.6.x-xfs-new/fs/xfs/xfs_iget.c
===================================================================
--- 2.6.x-xfs-new.orig/fs/xfs/xfs_iget.c 2008-02-15 19:27:02.000000000 +1100
+++ 2.6.x-xfs-new/fs/xfs/xfs_iget.c 2008-02-23 16:51:31.602711856 +1100
@@ -232,6 +232,7 @@ finish_inode:
* write spinlock.
*/
if (radix_tree_preload(GFP_KERNEL)) {
+ xfs_idestroy(ip);
delay(1);
goto again;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] fix inode leak in xfs_iget_core()
2008-02-23 6:19 [patch] fix inode leak in xfs_iget_core() David Chinner
@ 2008-02-23 9:22 ` Christoph Hellwig
2008-03-03 4:04 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2008-02-23 9:22 UTC (permalink / raw)
To: David Chinner; +Cc: xfs-dev, xfs-oss
On Sat, Feb 23, 2008 at 05:19:24PM +1100, David Chinner wrote:
> If the radix_tree_preload() fails, we need to destroy the
> inode we just read in before trying again. This could leak
> xfs_vnode structures when there is memory pressure. Noticed
> by Christoph Hellwig.
What we're leaking would be the xfs_inode. But this is exactly
the patch I had so OK from me :)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] fix inode leak in xfs_iget_core()
2008-02-23 9:22 ` Christoph Hellwig
@ 2008-03-03 4:04 ` Christoph Hellwig
0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2008-03-03 4:04 UTC (permalink / raw)
To: David Chinner; +Cc: xfs-dev, xfs-oss
On Sat, Feb 23, 2008 at 04:22:55AM -0500, Christoph Hellwig wrote:
> On Sat, Feb 23, 2008 at 05:19:24PM +1100, David Chinner wrote:
> > If the radix_tree_preload() fails, we need to destroy the
> > inode we just read in before trying again. This could leak
> > xfs_vnode structures when there is memory pressure. Noticed
> > by Christoph Hellwig.
>
> What we're leaking would be the xfs_inode. But this is exactly
> the patch I had so OK from me :)
Now that you're hopefully safe home can you commit it and push it
for .25?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-03 4:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-23 6:19 [patch] fix inode leak in xfs_iget_core() David Chinner
2008-02-23 9:22 ` Christoph Hellwig
2008-03-03 4:04 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox