projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
672c40a
)
kernel: Fix potential refcount leak in su check
author
Tom Marshall
<tdm.code@gmail.com>
Fri, 19 May 2017 18:24:04 +0000
(18:24 +0000)
committer
Stricted
<info@stricted.net>
Thu, 3 May 2018 16:46:03 +0000
(18:46 +0200)
Change-Id: I7e1ecb78bfc951bf645a1462988dcd93c4247a9b
fs/namei.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/namei.c
b/fs/namei.c
index 36d4b29459ecb52a713c1cc3565e426a36e43c77..67d8ee787f0135acdaf4b509519e693858dec01a 100644
(file)
--- a/
fs/namei.c
+++ b/
fs/namei.c
@@
-2012,8
+2012,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;
+ }
}
}