projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
994c0e9
)
vfs: fix dentry leak in simple_fill_super()
author
Konstantin Khlebnikov
<khlebnikov@openvz.org>
Tue, 1 Nov 2011 13:12:33 +0000
(16:12 +0300)
committer
Christoph Hellwig
<hch@serles.lst.de>
Wed, 2 Nov 2011 11:53:42 +0000
(12:53 +0100)
put dentry if inode allocation failed, d_genocide() cannot release it
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/libfs.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/libfs.c
b/fs/libfs.c
index c18e9a1235b6594373d5c18f2e615b5bf4b06596..a2c0029cd95f47821b9420c6ff80b03cc0941794 100644
(file)
--- a/
fs/libfs.c
+++ b/
fs/libfs.c
@@
-510,8
+510,10
@@
int simple_fill_super(struct super_block *s, unsigned long magic,
if (!dentry)
goto out;
inode = new_inode(s);
- if (!inode)
+ if (!inode) {
+ dput(dentry);
goto out;
+ }
inode->i_mode = S_IFREG | files->mode;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
inode->i_fop = files->ops;