projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ioctx_alloc(): fix vma (and file) leak on failure
[firefly-linux-kernel-4.4.55.git]
/
fs
/
aio.c
diff --git
a/fs/aio.c
b/fs/aio.c
index 58c33dcfb6caf4a668ae24cc6512c6385113243f..a793f7023755dc15cb2b8bebe5206bc610bb428c 100644
(file)
--- a/
fs/aio.c
+++ b/
fs/aio.c
@@
-731,6
+731,9
@@
static struct kioctx *ioctx_alloc(unsigned nr_events)
err_cleanup:
aio_nr_sub(ctx->max_reqs);
err_ctx:
+ atomic_set(&ctx->dead, 1);
+ if (ctx->mmap_size)
+ vm_munmap(ctx->mmap_base, ctx->mmap_size);
aio_free_ring(ctx);
err:
mutex_unlock(&ctx->ring_lock);