[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1379335925-30858-6-git-send-email-miklos@szeredi.hu>
Date: Mon, 16 Sep 2013 14:51:59 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: viro@...IV.linux.org.uk
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
mszeredi@...e.cz, Steve French <sfrench@...ba.org>,
stable@...r.kernel.org
Subject: [PATCH 05/11] cifs: fix filp leak in cifs_atomic_open()
From: Miklos Szeredi <mszeredi@...e.cz>
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@...e.cz>
Cc: Steve French <sfrench@...ba.org>
Cc: stable@...r.kernel.org
---
fs/cifs/dir.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index d3e2eaa..5384c2a 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -500,6 +500,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.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists