[ 3.8.y.z extended stable ] Patch "cifs: fix filp leak in cifs_atomic_open()" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Mon Oct 7 18:40:47 UTC 2013


This is a note to let you know that I have just added a patch titled

    cifs: fix filp leak in cifs_atomic_open()

to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue

This patch is scheduled to be released in version 3.8.13.11.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.8.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 5fbdbfe7bd24eae131d69b85756a98f1f1af4312 Mon Sep 17 00:00:00 2001
From: Miklos Szeredi <mszeredi at suse.cz>
Date: Mon, 16 Sep 2013 14:51:59 +0200
Subject: cifs: fix filp leak in cifs_atomic_open()

commit dfb1d61b0e9f9e2c542e9adc8d970689f4114ff6 upstream.

If an error occurs after having called finish_open() then fput() needs to
be called on the already opened file.

Signed-off-by: Miklos Szeredi <mszeredi at suse.cz>
Cc: Steve French <sfrench at samba.org>
Signed-off-by: Al Viro <viro at zeniv.linux.org.uk>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 fs/cifs/dir.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 8719bbe..adaee05 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -488,6 +488,7 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
 		if (server->ops->close)
 			server->ops->close(xid, tcon, &fid);
 		cifs_del_pending_open(&open);
+		fput(file);
 		rc = -ENOMEM;
 	}

--
1.8.1.2





More information about the kernel-team mailing list