diff options
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -263,6 +263,7 @@ static int __init aio_setup(void) aio_mnt = kern_mount(&aio_fs); if (IS_ERR(aio_mnt)) panic("Failed to create aio fs mount."); + aio_mnt->mnt_flags |= MNT_NOEXEC; kiocb_cachep = KMEM_CACHE(aio_kiocb, SLAB_HWCACHE_ALIGN|SLAB_PANIC); kioctx_cachep = KMEM_CACHE(kioctx,SLAB_HWCACHE_ALIGN|SLAB_PANIC); @@ -1338,7 +1339,7 @@ static long read_events(struct kioctx *ctx, long min_nr, long nr, SYSCALL_DEFINE2(io_setup, unsigned, nr_events, aio_context_t __user *, ctxp) { struct kioctx *ioctx = NULL; - unsigned long ctx; + unsigned long ctx = 0; long ret; ret = get_user(ctx, ctxp); @@ -1471,6 +1472,7 @@ rw_common: len = ret; + get_file(file); if (rw == WRITE) file_start_write(file); @@ -1478,6 +1480,7 @@ rw_common: if (rw == WRITE) file_end_write(file); + fput(file); kfree(iovec); break; |