diff options
author | Tom Marshall <tdm.code@gmail.com> | 2017-05-18 23:50:22 +0000 |
---|---|---|
committer | Andreas Blaesius <skate4life@gmx.de> | 2017-06-07 16:50:23 +0200 |
commit | cf8656e992e8c1f9417fae91ed389628e8686046 (patch) | |
tree | b006940bccb4c119ce8025e87189b82fda3ea9ef | |
parent | c89ce3e20e86206d3211df1308bc232b5f9852a8 (diff) | |
download | kernel_samsung_espresso10-cf8656e992e8c1f9417fae91ed389628e8686046.zip kernel_samsung_espresso10-cf8656e992e8c1f9417fae91ed389628e8686046.tar.gz kernel_samsung_espresso10-cf8656e992e8c1f9417fae91ed389628e8686046.tar.bz2 |
kernel: Fix potential refcount leak in su check
Change-Id: I8d2c8bed65a01eb0928308df638a04449a5bd881
-rw-r--r-- | fs/namei.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1626,8 +1626,10 @@ static int path_lookupat(int dfd, const char *name, if (!err) { struct super_block *sb = nd->inode->i_sb; if (sb->s_flags & MS_RDONLY) { - if (d_is_su(nd->path.dentry) && !su_visible()) + if (d_is_su(nd->path.dentry) && !su_visible()) { + path_put(&nd->path); err = -ENOENT; + } } } |