projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'vfio-v4.7-rc1' of git://github.com/awilliam/linux-vfio
[deliverable/linux.git]
/
fs
/
aio.c
diff --git
a/fs/aio.c
b/fs/aio.c
index a6deaa78326d5bd05adafc5b2bee373ca0757b83..fb8e45b88cd4ecf0aa4b3c485051d7f437ba7bd8 100644
(file)
--- a/
fs/aio.c
+++ b/
fs/aio.c
@@
-496,7
+496,12
@@
static int aio_setup_ring(struct kioctx *ctx)
ctx->mmap_size = nr_pages * PAGE_SIZE;
pr_debug("attempting mmap of %lu bytes\n", ctx->mmap_size);
ctx->mmap_size = nr_pages * PAGE_SIZE;
pr_debug("attempting mmap of %lu bytes\n", ctx->mmap_size);
- down_write(&mm->mmap_sem);
+ if (down_write_killable(&mm->mmap_sem)) {
+ ctx->mmap_size = 0;
+ aio_free_ring(ctx);
+ return -EINTR;
+ }
+
ctx->mmap_base = do_mmap_pgoff(ctx->aio_ring_file, 0, ctx->mmap_size,
PROT_READ | PROT_WRITE,
MAP_SHARED, 0, &unused);
ctx->mmap_base = do_mmap_pgoff(ctx->aio_ring_file, 0, ctx->mmap_size,
PROT_READ | PROT_WRITE,
MAP_SHARED, 0, &unused);
This page took
0.024428 seconds
and
5
git commands to generate.