- debugfs-inode-leak.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     debugfs inode leak

has been removed from the -mm tree.  Its filename is

     debugfs-inode-leak.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: debugfs inode leak
From: Jens Axboe <axboe@xxxxxxx>


I found a leak in debugfs.  In debugfs_mknod(), we create the inode before
checking if the dentry already has one attached.  We don't free it if that
is the case.

These bugs happen quite often, I'm starting to think we should disallow
such coding in CodingStyle.

Signed-off-by: Jens Axboe <axboe@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/debugfs/inode.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -puN fs/debugfs/inode.c~debugfs-inode-leak fs/debugfs/inode.c
--- devel/fs/debugfs/inode.c~debugfs-inode-leak	2006-06-08 01:51:49.000000000 -0700
+++ devel-akpm/fs/debugfs/inode.c	2006-06-08 01:51:49.000000000 -0700
@@ -67,12 +67,13 @@ static struct inode *debugfs_get_inode(s
 static int debugfs_mknod(struct inode *dir, struct dentry *dentry,
 			 int mode, dev_t dev)
 {
-	struct inode *inode = debugfs_get_inode(dir->i_sb, mode, dev);
+	struct inode *inode;
 	int error = -EPERM;
 
 	if (dentry->d_inode)
 		return -EEXIST;
 
+	inode = debugfs_get_inode(dir->i_sb, mode, dev);
 	if (inode) {
 		d_instantiate(dentry, inode);
 		dget(dentry);
_

Patches currently in -mm which might be from axboe@xxxxxxx are

origin.patch
git-block.patch
libata_resume_fix.patch
lsm-add-task_setioprio-hook.patch
fix-cdrom-being-confused-on-using-kdump.patch
ide-cd-end-of-media-error-fix.patch
nbd-endian-annotations.patch
block-layer-early-detection-of-medium-not-present.patch
scsi-core-and-sd-early-detection-of-medium-not-present.patch
sd-early-detection-of-medium-not-present.patch
cdrom-mcdx-section-fixes.patch
fix-ide-locking-error.patch
md-dm-reduce-stack-usage-with-stacked-block-devices.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux