Hi,

Kentaro Suzuki-san gave me a bug report related to the garbage
collection today.

The problem was brought by the recent bugfix patch and turned out to
be causing a new memory leak problem for linux-2.6.30-rc6 and
nilfs2-modules-2.0.13.

This is the bugfix patch against 2.6.30-rc6.  I'll send it to Linus
and backport to the module package.

Regards,
Ryusuke Konishi
--
From: Ryusuke Konishi <[email protected]>

This fixes a new memory leak problem in garbage collection.  The
problem was brought by the bugfix patch ("nilfs2: fix lock order
reversal in nilfs_clean_segments ioctl").

Thanks to Kentaro Suzuki for finding this problem.

Reported-by: Kentaro Suzuki <[email protected]>
Signed-off-by: Ryusuke Konishi <[email protected]>
---
 fs/nilfs2/ioctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c
index 50ff3f2..d6759b9 100644
--- a/fs/nilfs2/ioctl.c
+++ b/fs/nilfs2/ioctl.c
@@ -576,7 +576,7 @@ static int nilfs_ioctl_clean_segments(struct inode *inode, 
struct file *filp,
        ret = nilfs_clean_segments(inode->i_sb, argv, kbufs);
 
  out_free:
-       while (--n > 0)
+       while (--n >= 0)
                vfree(kbufs[n]);
        kfree(kbufs[4]);
        return ret;
-- 
1.6.2

_______________________________________________
users mailing list
[email protected]
https://www.nilfs.org/mailman/listinfo/users

Reply via email to