[kernel] r16714 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series

Maximilian Attems maks at alioth.debian.org
Mon Dec 20 09:33:54 UTC 2010


Author: maks
Date: Mon Dec 20 09:33:49 2010
New Revision: 16714

Log:
add cifs leak fix

Added:
   dists/sid/linux-2.6/debian/patches/bugfix/all/cifs-fix-another-memleak-in-cifs_root_iget.patch
Modified:
   dists/sid/linux-2.6/debian/changelog
   dists/sid/linux-2.6/debian/patches/series/30

Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog	Sun Dec 19 21:56:03 2010	(r16713)
+++ dists/sid/linux-2.6/debian/changelog	Mon Dec 20 09:33:49 2010	(r16714)
@@ -15,6 +15,7 @@
 
   [ maximilian attems ]
   * [openvz] Reenable NF_CONNTRACK_IPV6.
+  * cifs: fix another memleak, in cifs_root_iget.
 
  -- Ben Hutchings <ben at decadent.org.uk>  Sun, 12 Dec 2010 03:23:48 +0000
 

Added: dists/sid/linux-2.6/debian/patches/bugfix/all/cifs-fix-another-memleak-in-cifs_root_iget.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/cifs-fix-another-memleak-in-cifs_root_iget.patch	Mon Dec 20 09:33:49 2010	(r16714)
@@ -0,0 +1,59 @@
+From a7851ce73b9fdef53f251420e6883cf4f3766534 Mon Sep 17 00:00:00 2001
+From: Oskar Schirmer <oskar at scara.com>
+Date: Wed, 10 Nov 2010 21:06:13 +0000
+Subject: cifs: fix another memleak, in cifs_root_iget
+
+From: Oskar Schirmer <oskar at scara.com>
+
+commit a7851ce73b9fdef53f251420e6883cf4f3766534 upstream.
+
+cifs_root_iget allocates full_path through
+cifs_build_path_to_root, but fails to kfree it upon
+cifs_get_inode_info* failure.
+
+Make all failure exit paths traverse clean up
+handling at the end of the function.
+
+Signed-off-by: Oskar Schirmer <oskar at scara.com>
+Signed-off-by: Andi Kleen <ak at linux.intel.com>
+Reviewed-by: Jesper Juhl <jj at chaosbits.net>
+Signed-off-by: Steve French <sfrench at us.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
+
+---
+ fs/cifs/inode.c |   12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+Index: linux/fs/cifs/inode.c
+===================================================================
+--- linux.orig/fs/cifs/inode.c
++++ linux/fs/cifs/inode.c
+@@ -804,8 +804,10 @@ struct inode *cifs_root_iget(struct supe
+ 		rc = cifs_get_inode_info(&inode, full_path, NULL, sb,
+ 						xid, NULL);
+ 
+-	if (!inode)
+-		return ERR_PTR(-ENOMEM);
++	if (!inode) {
++		inode = ERR_PTR(rc);
++		goto out;
++	}
+ 
+ 	if (rc && cifs_sb->tcon->ipc) {
+ 		cFYI(1, "ipc connection - fake read inode");
+@@ -816,13 +818,11 @@ struct inode *cifs_root_iget(struct supe
+ 		inode->i_uid = cifs_sb->mnt_uid;
+ 		inode->i_gid = cifs_sb->mnt_gid;
+ 	} else if (rc) {
+-		kfree(full_path);
+-		_FreeXid(xid);
+ 		iget_failed(inode);
+-		return ERR_PTR(rc);
++		inode = ERR_PTR(rc);
+ 	}
+ 
+-
++out:
+ 	kfree(full_path);
+ 	/* can not call macro FreeXid here since in a void func
+ 	 * TODO: This is no longer true

Modified: dists/sid/linux-2.6/debian/patches/series/30
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/30	Sun Dec 19 21:56:03 2010	(r16713)
+++ dists/sid/linux-2.6/debian/patches/series/30	Mon Dec 20 09:33:49 2010	(r16714)
@@ -3,3 +3,4 @@
 + bugfix/x86/intel-iommu-Force-disable-IOMMU-for-iGFX-on-broken-C.patch
 + features/all/USB-Unusual-Device-support-for-Samsung-YP-CP3-MP4-Pl.patch
 + bugfix/all/tehuti-Firmware-filename-is-tehuti-bdx.bin.patch
++ bugfix/all/cifs-fix-another-memleak-in-cifs_root_iget.patch



More information about the Kernel-svn-changes mailing list