commit | e8f198b57ff68e1049ec3a481bf654d00f2341b7 | [log] [tgz] |
---|---|---|
author | Jens Axboe <axboe@fb.com> | Tue Dec 16 10:35:07 2014 -0700 |
committer | Mohamad Ayyash <mkayyash@google.com> | Fri Mar 06 17:58:08 2015 -0800 |
tree | f24702b86675cc159e8a28325a3c7fdc8199d6e5 | |
parent | 42ec5758abe080ab5e6d0e3cbe379308534bd133 [diff] |
engines/mmap: fix segfault on large devices and 32-bit archs Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/engines/mmap.c b/engines/mmap.c index 6464cba..b938d6b 100644 --- a/engines/mmap.c +++ b/engines/mmap.c
@@ -103,6 +103,11 @@ if (fio_file_partial_mmap(f)) return EINVAL; + if (io_u->offset != (size_t) io_u->offset || + f->io_size != (size_t) f->io_size) { + fio_file_set_partial_mmap(f); + return EINVAL; + } fmd->mmap_sz = f->io_size; fmd->mmap_off = 0;