projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69886e6
)
hostfs: hostfs_file_open: Fix a fd leak in hostfs_file_open
author
Richard Weinberger
<richard@nod.at>
Fri, 27 Feb 2015 21:56:28 +0000
(22:56 +0100)
committer
Richard Weinberger
<richard@nod.at>
Thu, 26 Mar 2015 22:27:48 +0000
(23:27 +0100)
In case of a race between to callers of hostfs_file_open()
it can happen that a file describtor is leaked.
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/hostfs/hostfs_kern.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/hostfs/hostfs_kern.c
b/fs/hostfs/hostfs_kern.c
index 104d58d2c78c7c57482fe24e2637afd6106319bd..112ba5aa0848d510ad75ac73986ceb5a9312a824 100644
(file)
--- a/
fs/hostfs/hostfs_kern.c
+++ b/
fs/hostfs/hostfs_kern.c
@@
-329,6
+329,7
@@
retry:
/* somebody else had handled it first? */
if ((mode & HOSTFS_I(ino)->mode) == mode) {
mutex_unlock(&HOSTFS_I(ino)->open_mutex);
+ close_file(&fd);
return 0;
}
if ((mode | HOSTFS_I(ino)->mode) != mode) {