projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97537b3
)
autofs: remove ino free in autofs4_dir_symlink()
author
Ian Kent
<
[email protected]
>
Tue, 11 Oct 2016 20:52:39 +0000
(13:52 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 11 Oct 2016 22:06:31 +0000
(15:06 -0700)
The inode allocation failure case in autofs4_dir_symlink() frees the
autofs dentry info of the dentry without setting ->d_fsdata to NULL.
That could lead to a double free so just get rid of the free and leave it
to ->d_release().
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Ian Kent <
[email protected]
>
Cc: Tomohiro Kusumi <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/autofs4/root.c
patch
|
blob
|
history
diff --git
a/fs/autofs4/root.c
b/fs/autofs4/root.c
index 623510e84c968c8e8cc2f34c23d1b897f75246b7..2eebeae75288da876736683d99de17508d4e97ef 100644
(file)
--- a/
fs/autofs4/root.c
+++ b/
fs/autofs4/root.c
@@
-577,8
+577,6
@@
static int autofs4_dir_symlink(struct inode *dir,
inode = autofs4_get_inode(dir->i_sb, S_IFLNK | 0555);
if (!inode) {
kfree(cp);
- if (!dentry->d_fsdata)
- kfree(ino);
return -ENOMEM;
}
inode->i_private = cp;