[PATCH 046/104] cifs: fix filp leak in cifs_atomic_open()
Kamal Mostafa
kamal at canonical.com
Thu Oct 10 15:41:34 UTC 2013
3.8.13.11 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Miklos Szeredi <mszeredi at suse.cz>
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