projects
/
platform
/
kernel
/
linux-amlogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a909d3e
)
aio: hold an extra file reference over AIO read/write operations
author
Christoph Hellwig
<hch@lst.de>
Sun, 30 Oct 2016 16:42:01 +0000
(11:42 -0500)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Sun, 30 Oct 2016 17:09:42 +0000
(13:09 -0400)
Otherwise we might dereference an already freed file and/or inode
when aio_complete is called before we return from the read_iter or
write_iter method.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/aio.c
patch
|
blob
|
history
diff --git
a/fs/aio.c
b/fs/aio.c
index
1157e13
..
0aa71d3
100644
(file)
--- a/
fs/aio.c
+++ b/
fs/aio.c
@@
-1460,6
+1460,7
@@
rw_common:
return ret;
}
+ get_file(file);
if (rw == WRITE)
file_start_write(file);
@@
-1467,6
+1468,7
@@
rw_common:
if (rw == WRITE)
file_end_write(file);
+ fput(file);
kfree(iovec);
break;